Comviva interview question

binary tree traversal implementation