Microsoft Interview Question

Print a tree on given criterion