Domanda di colloquio di ConnectWise

Implement a function that traverses a binary tree to a leaf node and checks if the sum is equal to a particular value. How can this function expand to non-binary trees?

Risposta di colloquio

Anonimo

21 feb 2017

Being able to use recursion (with appropriate end conditions) and talk about inorder/preorder/postorder traversal are definitely plusses.

3