Microsoft interview question

Write a simple code which traverses a binary tree