You are viewing a single comment's thread. Return to all comments →
Java code public static List rotLeft(List a, int d) {
if(d==0) return a; while(d>0){ Integer dup= a.get(0); a.remove(0); a.add(dup); d--; } return a; }
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →
Java code public static List rotLeft(List a, int d) {