MCPcopy Create free account
hub / github.com/careercup/ctci / InOrderTraverse

Function InOrderTraverse

go/chapter04/binarytree/binarytree.go:104–111  ·  view source on GitHub ↗

Traverse the tree using in-order traversal

(t *Tree)

Source from the content-addressed store, hash-verified

102
103//Traverse the tree using in-order traversal
104func InOrderTraverse(t *Tree) {
105 if t == nil {
106 return
107 }
108 InOrderTraverse(t.Left)
109 fmt.Print(t.Value, " ")
110 InOrderTraverse(t.Right)
111}
112
113//Height gives the height of the BST
114func Height(t *Tree) float64 {

Callers 1

mainFunction · 0.85

Calls 1

PrintMethod · 0.80

Tested by

no test coverage detected