Nested Iterator

http://www.careercup.com/question?id=6246384562864128