Synopsys Interview Question

Trasverse a tree