In particular, it really helps to understand the ideas in algorithmic efficiency and Big-O notation.
特别是,算法效率和大0符号能帮助你真正的理解你的想法。
Big-O notation: computational complexity theory USES big-O notation to describe how input-data size affects an algorithm's use of computational resources.
Big - o notation:计算复杂性理论使用大0符号描述输入数据大小如何影响计算资源对算法的使用。
N --O So we introduced this notation big O which generally refers to worst case.
的平方。,So,,N,squared。,这里我们介绍一个符号,它泛指最坏的情况。
Using this notation, you should know that search through a list is O(n) and binary search (through a sorted list) is log(n).
看到这个标记你就应该知道搜索链表的复杂度为O(n),进行二进制搜索时(已排序)的空间复杂度为log(n)。
Using this notation, you should know that search through a list is O(n) and binary search (through a sorted list) is log(n).
看到这个标记你就应该知道搜索链表的复杂度为O(n),进行二进制搜索时(已排序)的空间复杂度为log(n)。
应用推荐