Format code with prettier (#3375)

This commit is contained in:
acbin
2022-10-03 17:23:00 +08:00
committed by GitHub
parent 32b9b11ed5
commit e96f567bfc
464 changed files with 11483 additions and 6189 deletions

View File

@@ -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;