Groupon Interview Question

Write code to print a tree in a particular order.