Verily interview question

It was a array operation question