Update binary_tree_bfs codes

This commit is contained in:
krahets
2023-02-15 03:36:22 +08:00
parent 8e0080f003
commit 7238c560d1
10 changed files with 19 additions and 19 deletions

View File

@ -7,7 +7,7 @@
import utils
/* */
func hierOrder(root: TreeNode) -> [Int] {
func levelOrder(root: TreeNode) -> [Int] {
//
var queue: [TreeNode] = [root]
//
@ -36,7 +36,7 @@ enum BinaryTreeBFS {
PrintUtil.printTree(root: node)
/* */
let list = hierOrder(root: node)
let list = levelOrder(root: node)
print("\n层序遍历的结点打印序列 = \(list)")
}
}