mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
refactor: Replace 'poll' with 'pop' in Heap (#416)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user