You are viewing a single comment's thread. Return to all comments →
Solution for c#.
public static List<int> rotLeft(List<int> a, int d) { int n = a.Count; int rotateBy = d % n; List<int> rotatedPart = a.GetRange(0, rotateBy); a.RemoveRange(0, rotateBy); a.AddRange(rotatedPart); return a; }
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →
Solution for c#.