Amazon Interview Question

Traverse a binary tree using a language of your choice