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 }
Seems like cookies are disabled on this browser, please enable them to open this website
Left Rotation
You are viewing a single comment's thread. Return to all comments →
Kotlin