• + 0 comments

    C# Solution - Basically you want to first convert List to Array type cuz you want to use range operator which makes it easy to dissect arrays. Lastly you want to append those two arrays and convert it back to list.

     var x = arr.ToArray();
            int[] a = x[..d];
            int[] b = x[d..];
            List<int> c = new []{ b, a}.SelectMany(s => s).ToList();
            return c;