mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 21:24:53 +08:00
堆: 颗 -> 棵 (#343)
This commit is contained in:
@ -247,7 +247,7 @@ comments: true
|
||||
|
||||
### 堆的存储与表示
|
||||
|
||||
在二叉树章节我们学过,「完全二叉树」非常适合使用「数组」来表示,而堆恰好是一颗完全二叉树,**因而我们采用「数组」来存储「堆」**。
|
||||
在二叉树章节我们学过,「完全二叉树」非常适合使用「数组」来表示,而堆恰好是一棵完全二叉树,**因而我们采用「数组」来存储「堆」**。
|
||||
|
||||
**二叉树指针**。使用数组表示二叉树时,元素代表结点值,索引代表结点在二叉树中的位置,**而结点指针通过索引映射公式来实现**。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user