LinkedIn Interview Question

How to write a deep iterator.