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.
- Prepare
- Data Structures
- Arrays
- Left Rotation
- Discussions
Left Rotation
Left Rotation
Sort by
recency
|
3482 Discussions
|
Please Login in order to post a comment
My respost in Python:
I used loops the first time, but they weren't very efficient.
JavaScript:
Here is my c++ solution, you can have the video explanation here : https://youtu.be/lyUDSB4Sg7Y
def rotateLeft(d, arr): # Write your code here a=(arr[d:]+arr[:d]) return a
def rotateLeft(d, arr): # Write your code here a=(arr[d:]+arr[:d])