MCPcopy Create free account
hub / github.com/arnauddri/algorithms / IterOnTree

Function IterOnTree

data-structures/binary-tree/bst.go:148–159  ·  view source on GitHub ↗
(n *Node, f func(*Node))

Source from the content-addressed store, hash-verified

146}
147
148func IterOnTree(n *Node, f func(*Node)) bool {
149 if n == nil {
150 return true
151 }
152 if !IterOnTree(n.Left, f) {
153 return false
154 }
155
156 f(n)
157
158 return IterOnTree(n.Right, f)
159}

Callers 1

DeleteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected