You are viewing a single comment's thread. Return to all comments →
Kotlin
fun rotateLeft(d: Int, arr: Array<Int>): Array<Int> { val myArr = Array(arr.size) { 0 } for (i in arr.indices) { myArr[i] = arr[(i+d) % arr.size] } return myArr }
Left Rotation
You are viewing a single comment's thread. Return to all comments →
Kotlin