Quantiphi interview question

rotation of elements in an 2D array