Whats time complexity of this python function?

后端 未结 0 463
def hasPairWithSum(arr,target):
     for i in range(len(arr)):
         if ((target-arr[i])  in arr[i+1:]):
             return True

    return False    

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