Glossary: Coding Interviews in Go
Tree recursion
Also written: pattern 6
Solving a tree question by returning a base answer for `nil`, asking each child for its answer, and combining them with the node's value, as `total` does for wholesale orders.
Glossary: Coding Interviews in Go
Also written: pattern 6
Solving a tree question by returning a base answer for `nil`, asking each child for its answer, and combining them with the node's value, as `total` does for wholesale orders.