Skip to content

Commit 0785095

Browse files
authored
Update maximum-score-of-a-good-subarray.py
1 parent a3d05ea commit 0785095

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Python/maximum-score-of-a-good-subarray.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
# Space: O(n)
33

44
class Solution(object):
5-
def largestRectangleArea(self, heights):
5+
def maximumScore(self, nums, k):
66
"""
7-
:type heights: List[int]
7+
:type nums: List[int]
8+
:type k: int
89
:rtype: int
910
"""
1011
result = curr = nums[k]
@@ -47,3 +48,4 @@ def score(nums, k):
4748
return result
4849

4950
return max(score(nums, k), score(nums[::-1], len(nums)-1-k))
51+

0 commit comments

Comments
 (0)