LinkedIn interview question

Flatten nested list iterator.