mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
Add Go codes to docs, including
the chapter of stack and queue, the chapter of tree.
This commit is contained in:
@@ -4,7 +4,10 @@
|
||||
|
||||
package pkg
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestTreeNode(t *testing.T) {
|
||||
arr := []int{2, 3, 5, 6, 7}
|
||||
@@ -14,5 +17,5 @@ func TestTreeNode(t *testing.T) {
|
||||
PrintTree(node)
|
||||
|
||||
// tree to arr
|
||||
t.Log(TreeToArray(node))
|
||||
fmt.Println(TreeToArray(node))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user