From b37a088f7d6891c161053ca164a2045aa680fee7 Mon Sep 17 00:00:00 2001 From: krahets Date: Mon, 13 Mar 2023 22:47:22 +0800 Subject: [PATCH] Fix a comment in binary_tree_bfs.go --- codes/go/chapter_tree/binary_tree_bfs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/go/chapter_tree/binary_tree_bfs.go b/codes/go/chapter_tree/binary_tree_bfs.go index 4ace9fcf..76dc4aea 100644 --- a/codes/go/chapter_tree/binary_tree_bfs.go +++ b/codes/go/chapter_tree/binary_tree_bfs.go @@ -18,7 +18,7 @@ func levelOrder(root *TreeNode) []int { // 初始化一个切片,用于保存遍历序列 nums := make([]int, 0) for queue.Len() > 0 { - // 队首元素出队 + // 队列出队 node := queue.Remove(queue.Front()).(*TreeNode) // 保存结点值 nums = append(nums, node.Val)