Gainsight Interview Question

rotate array by 90 degrees