HackerRank - Left Rotation | Full Solution and Examples | Study Algorithms

Опубликовано: 27 Октябрь 2024
на канале: Nikhil Lohia
18,830
411

Given an array of integers, you need to perform a left rotation on the array 'k' number of times. This video explains you what is rotation and how can you go about solving the problem. This is a very important interview question and the video shows 2 ways to solve it. Watch the video to know more.

00:00 - Intro
01:14 - Problem Statement and sample test cases
04:46 - Brute Force solution
06:53 - Method 1
09:23 - Method 2
12:31 - Final thoughts

📘 The problem description and solution is available at: https://studyalgorithms.com/array/hac...

📚 Links I talk about in the video
Brute Force Algorithmic Paradigm:    • Brute Force algorithms with real life...  
Problem on HackerRank: https://www.hackerrank.com/challenges...
Code on Github: https://github.com/nikoo28/java-solut...
TestCases on Github: https://github.com/nikoo28/java-solut...

🔗 To see more videos like this, you can show your support on: https://www.buymeacoffee.com/studyalg...

💻 Get Social 💻
Follow on Facebook at:   / studyalgos  
Follow on Twitter at:   / studyalgorithms  
Follow on Tumblr at:   / studyalgos  
Subscribe to RSS feeds: https://studyalgorithms.com/feed/

#hackerrank #programming #tutorial