Cisco interview question

Tree traversal. Write a method to output data in binary tree