We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Circular Array Rotation
Circular Array Rotation
Sort by
recency
|
3106 Discussions
|
Please Login in order to post a comment
My python solution:
My C++ solution
vector circularArrayRotation(vector & arr, int k, vector queries) { vector res; // k % arr.size() enusre that we are not unnecessarily rotating back to original std::rotate(arr.rbegin(), arr.rbegin() + (k % arr.size()), arr.rend());
}
function circularArrayRotation(a, k, queries) {
}
in scala without actually rotating