You are viewing a single comment's thread. Return to all comments →
Can you guys explain to me this line
if(idx-rot>=0) System.out.println(arr[idx-rot]); else System.out.println(arr[idx-rot+arr.length]);
I don't understand why it can refer to the roation element of array?
Seems like cookies are disabled on this browser, please enable them to open this website
Circular Array Rotation
You are viewing a single comment's thread. Return to all comments →
Can you guys explain to me this line
I don't understand why it can refer to the roation element of array?