Cloudera Interview Question

Implementing an iterator with arrays