Cloudera interview question

Implementing an iterator with arrays