Verily Interview Question

It was a array operation question