Write a class FlatIterator that takes a list of lists of integers and implements the Iterator interface: hasNext tells you whether there are elements left, and next returns the next number, going through all the nested lists in order. You're not allowed to copy all the elements into one combined list up front.
~15 min by voice
How to approach it
The interviewer is checking whether you can implement a lazy, stateful iterator: correctly keep two levels of iteration, skip empty nested lists, and follow the Iterator contract: an idempotent hasNext, next without a prior hasNext, NoSuchElementException at the end.
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.