Amazon Interview Question

Traverse a binary tree efficiently