Skip to content

Commit 7b0ed06

Browse files
committed
Runtime: 85 ms (Top 41.74%) | Memory: 54.3 MB (Top 53.04%)
1 parent 88518a6 commit 7b0ed06

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/algorithms/S/Strange Printer II/Strange Printer II.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
// Runtime: 85 ms (Top 41.74%) | Memory: 54.3 MB (Top 53.04%)
12
class Solution {
23
// store each color's left, top, right, bottom
34
private Set<Integer>[] graph;
45
private int[] indegrees;
5-
private int[][] ranges;
6+
private int[][] ranges;
67
private boolean[] exists;
78
private int m;
89
private int n;
9-
private int maxColor = 60;
10+
private int maxColor = 60;
1011
public boolean isPrintable(int[][] targetGrid) {
1112
this.m = targetGrid.length;
1213
this.n = targetGrid[0].length;
@@ -55,7 +56,7 @@ private void buildRanges(int[][] targetGrid) {
5556
}
5657
maxColor = max;
5758
}
58-
// TC O(n^3) to build graph
59+
// TC O(n^3) to build graph
5960
private void buildGraph(int[][] targetGrid) {
6061
graph = new Set[maxColor + 1];
6162
indegrees = new int[maxColor + 1];
@@ -74,4 +75,4 @@ private void buildGraph(int[][] targetGrid) {
7475
}
7576
}
7677
}
77-
}
78+
}

0 commit comments

Comments
 (0)