Glossary: Coding Interviews in Java
Tree recursion
Also written: TreeNode
Solving a tree question by returning a base answer for an empty tree (`null`), asking each child for its answer, and combining them with the node's value. It costs O(n).
Glossary: Coding Interviews in Java
Also written: TreeNode
Solving a tree question by returning a base answer for an empty tree (`null`), asking each child for its answer, and combining them with the node's value. It costs O(n).