본문 바로가기
python-algorithm

leetcode 852. Peak Index in a Mountain Array

by 무적김두칠 2022. 3. 22.

1
2
3
4
class Solution:
    def peakIndexInMountainArray(self, arr: List[int]) -> int:
        maxIndex=arr.index(max(arr))
        return maxIndex
cs
반응형

댓글