diff --git a/docs/chapter_tree/binary_tree.md b/docs/chapter_tree/binary_tree.md index afe509356..b16df2482 100644 --- a/docs/chapter_tree/binary_tree.md +++ b/docs/chapter_tree/binary_tree.md @@ -510,7 +510,9 @@ === "Go" ```go title="" - + /* 二叉树的数组表示 */ + // 使用 any 类型的切片, 就可以使用 nil 来标记空位 + tree := []any{1, 2, 3, 4, nil, 6, 7, 8, 9, nil, nil, 12, nil, nil, 15} ``` === "JavaScript"