LinkedIn Interview Question

Implement Java Iterator interface in a question that requires a tree traversal-like algorithm.