fix(tree): fix ArrToTree in go code

This commit is contained in:
reanon
2023-01-08 20:00:36 +08:00
parent b73ac7bf4b
commit 33e2c4f4d3
4 changed files with 14 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ import (
func TestPreInPostOrderTraversal(t *testing.T) {
/* 初始化二叉树 */
// 这里借助了一个从数组直接生成二叉树的函数
root := ArrToTree([]int{1, 2, 3, 4, 5, 6, 7})
root := ArrToTree([]any{1, 2, 3, 4, 5, 6, 7})
fmt.Println("\n初始化二叉树: ")
PrintTree(root)