refactor: Replace 'poll' with 'pop' in Heap (#416)

This commit is contained in:
Yudong Jin
2023-03-13 22:31:05 +08:00
committed by GitHub
parent 8aebbaad21
commit 28aacccf44
27 changed files with 91 additions and 152 deletions

View File

@@ -36,7 +36,7 @@ func ArrToTree(arr []any) *TreeNode {
queue.PushBack(root)
i := 0
for queue.Len() > 0 {
// poll
// 队首元素出队
node := queue.Remove(queue.Front()).(*TreeNode)
i++
if i < len(arr) {