Rotate array clockwise
- by user69514
I have a two dimensional array that I need to rotate 90 degrees clockwise, however I keep getting arrayindexoutofbounds...
public int[][] rorateArray(int[][] arr){
//first change the dimensions vertical length for horizontal length
//and viceversa
int[][] newArray = new int[arr[0].length][arr.length];
//invert…