You are viewing a single comment's thread. Return to all comments →
Java Easy solution
public static List<Integer> rotateLeft(int d, List<Integer> arr) { if(d==arr.size()){ return arr; } int i=0; for(;i<d;d--){ int temp = arr.get(i); arr.remove(i); arr.add(temp); } return arr; }
Seems like cookies are disabled on this browser, please enable them to open this website
Left Rotation
You are viewing a single comment's thread. Return to all comments →
Java Easy solution