doc: add notes to time and space complexity post

This commit is contained in:
Leon Xu committed 2022-03-08 15:50:15 -08:00
1 parent de89a8053c
commit 56d2f188a2
1 file changed
+3 -1
+3 -1
View File
@@ -77,4 +77,6 @@ while (i < n) {
也就是说,当循环$log2^n$次以后,这个代码就结束了。因此,这个代码的时间复杂度为:$O(log n)$。
如下列举了常用的几种时间复杂度,以及它们之间的大小关系(值越小,算法的运行效率越高):
$O(1)$常数阶 < $O(logn)$对数阶 < $O(n)$线性阶 < $O(n^2)$平方阶 < $O(n^3)$立方阶 < $O(2^n)$ 指数阶
{% note default no-icon %}
$O(1)$常数阶 < $O(logn)$对数阶 < $O(n)$线性阶 < $O(n^2)$平方阶 < $O(n^3)$立方阶 < $O(2^n)$ 指数阶
{% endnote %}