Go Rotación circular de la matriz se mueve a la derecha
// circular rotation moving to right
func rotateRight(arr[]int, rotate int) []int {
if rotate == 0 || len(arr) == 0 || len(arr) == 1 {
return arr
}
if len(arr) < rotate {
rotate = rotate % len(arr)
}
lhs := arr[len(arr) - rotate:]
return append(lhs, arr[:len(arr) - rotate]...)
}
Mackerel