We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc8bde3 commit 445bb44Copy full SHA for 445bb44
scripts/algorithms/L/Last Stone Weight/Last Stone Weight.py
@@ -1,3 +1,4 @@
1
+# Runtime: 59 ms (Top 27.86%) | Memory: 13.9 MB (Top 62.57%)
2
class Solution:
3
def lastStoneWeight(self, stones: List[int]) -> int:
4
stones = [-x for x in stones]
@@ -12,4 +13,3 @@ def lastStoneWeight(self, stones: List[int]) -> int:
12
13
if len(stones):
14
return -heapq.heappop(stones)
15
return 0
-
0 commit comments