You are viewing a single comment's thread. Return to all comments →
fun leftRotation(d: Int, arr: Array<Int>): Array<Int> { val result = arr.toMutableList() for (i in 0 until d) { val first = result.first() result.removeAt(0) result.add(first) } return result.toTypedArray() }
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 →