摘要:
binary search binary search time complexity = O(logn) the question usually give you a sorted array and then find a target(index) in the value: the big 阅读全文
摘要:
不是O(N^2) ,是O(N)。两个指针遍历了整个数组一次 时间复杂度与最内层循环主体的执行次数有关与有多少重循环无关. The time complexity is related to the number of executions of the innermost loop body, in 阅读全文