Here's a quick solution to rotating an array left a certain number of times. There are several other ways to do this, including faster ways, but here is the first one I came up with. Feel free to comment about other approaches you can take.
0:00 Question explanation
1:06 Handling a single rotation
3:21 Handling multiple rotations
4:05 Walkthrough and edgecases
5:00 Testing
6:09 Solution recap
📬 SUBSCRIBE: https://www.youtube.com/channel/UCPGv2tVqEt6iBFnnMTjnRBA?sub_confirmation=1
Code link:
https://github.com/bradydowling/read-write-exercise/blob/master/exercises/hackerrank/arrays/leftRotate.js