mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-12 15:36:05 +00:00
Re-translate the Japanese version (#1871)
* Retranslate Japanese docs with GPT-5.4 * Retranslate Japanese code with GPT-5.4
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// File: tree_node_test.go
|
||||
// Created Time: 2022-11-25
|
||||
// Author: Reanon (793584285@qq.com)
|
||||
|
||||
package pkg
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestTreeNode(t *testing.T) {
|
||||
arr := []any{1, 2, 3, nil, 5, 6, nil}
|
||||
node := SliceToTree(arr)
|
||||
|
||||
// print tree
|
||||
PrintTree(node)
|
||||
|
||||
// tree to arr
|
||||
fmt.Println(TreeToSlice(node))
|
||||
}
|
||||
Reference in New Issue
Block a user