Virtusa interview question

Psuedocode for N-ary trees