Skip to content

Commit 4f7322e

Browse files
author
robot
committed
fix: typo
1 parent 35a1669 commit 4f7322e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

thinkings/heap.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ h.heappop() # 3
615615

616616
因此**弹出根节点后,经过上面的下沉操作一定仍然满足堆的性质**
617617

618-
时间复杂度方面可以证明,下沉和树的高度成正相关,因此时间复杂度为 $logh$,其中 h 为树高。而由于二叉堆是一颗完全二叉树,因此树高大约是 $logN$,其中 N 为树中的节点个数。
618+
时间复杂度方面可以证明,下沉和树的高度成正相关,因此时间复杂度为 $O(h)$,其中 h 为树高。而由于二叉堆是一颗完全二叉树,因此树高大约是 $logN$,其中 N 为树中的节点个数。
619619

620620
##### 入堆
621621

0 commit comments

Comments
 (0)