public static int[] Rotate(int[] arr , int k)
{
k %= arr.Length;
var ls = new int[arr.Length];
for (int i = 0; i < ls.Length-k; i++)
{
ls[i+k] = arr[i];
}
var j = ls.Length-k;
for (int i = 0; i < k; i++)
{
ls[i] = arr[j++];
}
return ls;
}