mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
Format code with prettier (#3375)
This commit is contained in:
@@ -18,7 +18,11 @@ public class SkylineProblem {
|
||||
for (int i = 0; i < num; i++) {
|
||||
String input = sc.next();
|
||||
String[] data = input.split(",");
|
||||
this.add(Integer.parseInt(data[0]), Integer.parseInt(data[1]), Integer.parseInt(data[2]));
|
||||
this.add(
|
||||
Integer.parseInt(data[0]),
|
||||
Integer.parseInt(data[1]),
|
||||
Integer.parseInt(data[2])
|
||||
);
|
||||
}
|
||||
this.print(this.findSkyline(0, num - 1));
|
||||
|
||||
@@ -58,7 +62,10 @@ 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