Microsoft Interview Question

iterating over an entrire tree