class Solution(object):
    def peakIndexInMountainArray(self, arr):
        """
        :type arr: List[int]
        :rtype: int
        """
        if(len(arr) == 1) :
            return 0
        
        for i in range(len(arr)) :
            if(i < len(arr) - 1 and arr[i] > arr[i+1]) :
                return i
            
            if(i == len(arr) - 1) :
                return i
5cb7b4f4f151358d28dcc04b269241b5988ad4dc
<mask token>

class Solution(object):
    <mask token>

class Solution(object):

    def peakIndexInMountainArray(self, arr):
        """
        :type arr: List[int]
        :rtype: int
        """
        if len(arr) == 1:
            return 0
        for i in range(len(arr)):
            if i < len(arr) - 1 and arr[i] > arr[i + 1]:
                return i
            if i == len(arr) - 1:
                return i

class Solution(object):
    def peakIndexInMountainArray(self, arr):
        """
        :type arr: List[int]
        :rtype: int
        """
        if(len(arr) == 1) :
            return 0
        
        for i in range(len(arr)) :
            if(i < len(arr) - 1 and arr[i] > arr[i+1]) :
                return i
            
            if(i == len(arr) - 1) :
                return i