Gainsight interview question

rotate array by 90 degrees