Skip to content

Commit 04ebaac

Browse files
committed
Runtime: 3 ms (Top 42.30%) | Memory: 40.7 MB (Top 84.83%)
1 parent d416b4b commit 04ebaac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/L/Last Stone Weight/Last Stone Weight.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 3 ms (Top 42.30%) | Memory: 40.7 MB (Top 84.83%)
12
class Solution {
23
public int lastStoneWeight(int[] stones) {
34
PriorityQueue<Integer> pq = new PriorityQueue<>((x,y) -> Integer.compare(y,x));
@@ -11,4 +12,4 @@ public int lastStoneWeight(int[] stones) {
1112
}
1213
return (pq.isEmpty()) ? 0 : pq.poll();
1314
}
14-
}
15+
}

0 commit comments

Comments
 (0)