comefrom: <garvit244>162_2.py
code: def findPeakElement( nums):
      left = [False]*len(nums)
      right = [False]*len(nums)
      left[0], right[len(nums)-1] = True, True
      
      for index in range(1, len(nums)):
          if nums[index] > nums[index-1]:
              left[index] = True
      
      for index in range(len(nums)-2, -1, -1):
          if nums[index] > nums[index+1]:
              right[index] = True
      
      for index in range(len(left)):
          if left[index] and right[index]:
              return index
      return -1
masked: def sample_funcname ( var_0 ) :
      var_3 = [ False ] * len ( var_0 )
      var_4 = [ False ] * len ( var_0 )
      var_3 [ 0 ] , var_4 [ len ( var_0 ) - 1 ] = True , True
      for var_9 in range ( 1 , len ( var_0 ) ) :
          if var_0 [ var_9 ] > var_0 [ var_9 - 1 ] :
              var_3 [ var_9 ] = True
      for var_9 in range ( len ( var_0 ) - 2 , - 1 , - 1 ) :
          if var_0 [ var_9 ] > var_0 [ var_9 + 1 ] :
              var_4 [ var_9 ] = True
      for var_9 in range ( len ( var_3 ) ) :
          if var_3 [ var_9 ] and var_4 [ var_9 ] :
              return var_9
      return - 1
  