GlobalLogic interview question

One Code on arrays was asked.