Pergunta de entrevista da empresa Standard Chartered Bank

How to traverse in an array ?