Domanda di colloquio di IBM

A coding question based on arrays.