which one is faster to implement accessing via index or using enumerate?

后端 未结 0 813
独厮守ぢ
独厮守ぢ 2021-01-17 01:36

once i tried to implement a code which finds the peak element index in python.

def findPeakElement(nums):
   l = len(nums)
   if l > 1:
       if nums[0] &         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题