You are viewing a single comment's thread. Return to all comments →
Just wanted to ask how do you came up with the one line solution to the problem.
System.out.println(a[(n - (k % n)+ m) % n]);
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 →
Just wanted to ask how do you came up with the one line solution to the problem.