IEM Corp. interview question

Write a function to traverse a binary tree.