mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-26 13:06:07 +00:00
Add ru version (#1865)
* Add Russian docs site baseline * Add Russian localized codebase * Polish Russian code wording * Update ru code translation. * Update code translation and chapter covers. * Fix pythontutor extraction. * Add README and landing page. * placeholder of profiles * Use figures of English version * Remove chapter paperbook
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