Skip to content

Commit 94ed70c

Browse files
committed
Runtime: 635 ms (Top 30.72%) | Memory: 21.1 MB (Top 46.08%)
1 parent dcdb675 commit 94ed70c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/algorithms/M/Maximum Width Ramp/Maximum Width Ramp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Runtime: 635 ms (Top 30.72%) | Memory: 21.1 MB (Top 46.08%)
12
class Solution:
23
def maxWidthRamp(self, nums: List[int]):
34
st=[]
@@ -11,6 +12,5 @@ def maxWidthRamp(self, nums: List[int]):
1112
while len(st) and nums[st[-1]]<=nums[j]:
1213
prev=st.pop()
1314
max_idx=max(max_idx,j-prev)
14-
15+
1516
return max_idx
16-

0 commit comments

Comments
 (0)