go-concurrency101/exercise/equal-binary-tree/README.md

382 B

Test cases

Test Case 1

fmt.Println(Same(tree.New(1), tree.New(1)))

output


Test Case 2

t := tree.New(1)
fmt.Println(Same(t, t))

output

ch2
10
ch1
10
ch2
5
ch1
5
ch2
3
ch1
3
ch2
2
ch1
2
ch2
7
ch1
7
ch2
9
ch1
9
ch2
8
ch1
8
ch2 done
0
true

Test Case 3

fmt.Println(Same(tree.New(1), tree.New(2)))

output