mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
@@ -19,10 +19,7 @@ public class SkylineProblem {
|
||||
String input = sc.next();
|
||||
String[] data = input.split(",");
|
||||
this.add(
|
||||
Integer.parseInt(data[0]),
|
||||
Integer.parseInt(data[1]),
|
||||
Integer.parseInt(data[2])
|
||||
);
|
||||
Integer.parseInt(data[0]), Integer.parseInt(data[1]), Integer.parseInt(data[2]));
|
||||
}
|
||||
this.print(this.findSkyline(0, num - 1));
|
||||
|
||||
@@ -62,10 +59,7 @@ public class SkylineProblem {
|
||||
return this.mergeSkyline(sky1, sky2);
|
||||
}
|
||||
|
||||
public ArrayList<Skyline> mergeSkyline(
|
||||
ArrayList<Skyline> sky1,
|
||||
ArrayList<Skyline> sky2
|
||||
) {
|
||||
public ArrayList<Skyline> mergeSkyline(ArrayList<Skyline> sky1, ArrayList<Skyline> sky2) {
|
||||
int currentH1 = 0, currentH2 = 0;
|
||||
ArrayList<Skyline> skyline = new ArrayList<>();
|
||||
int maxH = 0;
|
||||
|
||||
Reference in New Issue
Block a user