Skip to content

Commit 91ea9ad

Browse files
committed
Runtime: 526 ms (Top 46.46%) | Memory: 54.8 MB (Top 85.59%)
1 parent 327d787 commit 91ea9ad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/algorithms/Q/Query Kth Smallest Trimmed Number/Query Kth Smallest Trimmed Number.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 526 ms (Top 46.46%) | Memory: 54.8 MB (Top 85.59%)
12
class Solution {
23
public int[] smallestTrimmedNumbers(String[] nums, int[][] queries) {
34

@@ -7,7 +8,7 @@ public int[] smallestTrimmedNumbers(String[] nums, int[][] queries) {
78
int[] result = new int[queries.length];
89
int strLen = nums[0].length();
910
int[] index = new int[1];
10-
11+
1112
PriorityQueue<Integer> queue = new PriorityQueue<>((a, b) -> {
1213
for (int i = index[0]; i < strLen; i++) {
1314
if (nums[a].charAt(i) != nums[b].charAt(i))
@@ -32,4 +33,4 @@ public int[] smallestTrimmedNumbers(String[] nums, int[][] queries) {
3233

3334
return result;
3435
}
35-
}
36+
}

0 commit comments

Comments
 (0)