1
2
3
4
|
class Solution:
def peakIndexInMountainArray(self, arr: List[int]) -> int:
maxIndex=arr.index(max(arr))
return maxIndex
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 349. Intersection of Two Arrays (0) | 2022.03.23 |
---|---|
leetcode 2085. Count Common Words With One Occurrence (0) | 2022.03.22 |
leetcode 1380. Lucky Numbers in a Matrix (0) | 2022.03.22 |
leetcode 1356. Sort Integers by The Number of 1 Bits (0) | 2022.03.22 |
leetcode 977. Squares of a Sorted Array (0) | 2022.03.22 |
댓글