上一节,讲了复杂度的大 O 表示法和几个分析技巧,还举了一些常见的例子,比如 O(1)、O(logn)、O(n)、O(nlogn)复杂度分析。
这一节,继续讲四个复杂度分析方面的知识点,最好情况时间复杂度
(best case time complexity)、最坏情况时间复杂度
(worst case time complexity)、平均情况时间复杂度
(average case time complexity)、均摊时间复杂度
(amortized time complexity)。