Leetcode 852. Peak Index in a Mountain Array

class Solution:
    def peakIndexInMountainArray(self, A: List[int]) -> int:
        for i in range(1,len(A)-1):
            if A[i-1]<A[i] and A[i]>A[i+1]:
                return i
原文地址:https://www.cnblogs.com/zywscq/p/10680988.html