How To Rotate An Array In Java? | Array Rotation | FREE DSA Course in JAVA | Lecture 66

  Рет қаралды 30,464

TAP ACADEMY

TAP ACADEMY

Жыл бұрын

We have to write a program to rotate an array in Java.
What does the rotation of the array mean?
Consider an array 1,2,3,4,5 Rotating this array by 1 in counterclockwise means the newly rotated array will be 2,3,4,5,1.
Similarly rotating this array by 2 counterclockwise means the newly rotated array will be 3,4,5,1,2.
So we have to write a program to rotate an array by a given number k where the positive value of k denotes counterclockwise rotation and negative values of denote clockwise rotation.
This is a basic program that is generally asked in some companies.
Let's check out how you can solve this question with the most efficient approach.
Subscribe ‪@TAPACADEMY‬ for regular coding-related tips.
For more information, fill out this form: forms.gle/8eiUmM92Fx563Aen9
or call us at 8884881203
Facebook: / thetapacademy
Instagram: / tapacademy_online
Linkedin: / 73820805
Website: www.thetapacademy.com​
#java #array #coding #programming #aarrayjava #javacourse #placementcourse

Пікірлер: 63
@jayprakashKumar-hp3hw
@jayprakashKumar-hp3hw Жыл бұрын
He is such a phenomenal guy educating DSA in a simple and smooth way.
@gauribhosale8712
@gauribhosale8712 8 ай бұрын
I have gone through the many DsA series on KZbin and other platforms too. But seriously this is the best channel I have ever found to learn DSA.
@rutikbodkeacademy1247
@rutikbodkeacademy1247 7 ай бұрын
This type of explantion never got anywhere, thank you for making such kind of video
@nallapatiDeepak-bl3wx
@nallapatiDeepak-bl3wx Жыл бұрын
The Best video I have ever seen on a DSA, Thanks a lot sir for the effort you put in making the concept clear.
@Pradeepkumar-es8qm
@Pradeepkumar-es8qm Жыл бұрын
Damn! Such a good explanation with the best teaching tools 🔥. Awesome
@mridulgarg2539
@mridulgarg2539 Жыл бұрын
The underappreciated channel. Sir(bhaiya) wonderful explanation thanks.
@Hasan_770
@Hasan_770 8 ай бұрын
Respect for him. Best explanation and best quality content.
@raam2508
@raam2508 2 ай бұрын
Definitely the best explanation by any DSA tutor I have ever seen on KZbin !!
@user-dx8fw2dc6h
@user-dx8fw2dc6h 6 ай бұрын
oh my god sir. You made me visualize and understand things so easily. I am very very thankful to you. Instant subscribe to ur channel. thanks. Please never get demotivated or stop making videos sir. People like me struggle to find someone who can teach like this and clear all doubts. Pls keep making videos always.
@vishnubj826
@vishnubj826 4 ай бұрын
The way he is teaching and pictorial representation is quite cool and easy to understand
@user-qr9uo5it2r
@user-qr9uo5it2r 3 ай бұрын
Really so amazing video i ever seen on youtube with great visual representation
@PathanVlogs098
@PathanVlogs098 Ай бұрын
This explanation is wise and can be understandable to 1st class students too..best explanation ever i heard in my life.
@tejassalunkheofficial
@tejassalunkheofficial 5 ай бұрын
Best explanation sir ❤ Very clear explanation with super clarity of concepts
@tamilmukbang3789
@tamilmukbang3789 3 ай бұрын
Thank you so much. i understood the concept very well
@rohithbathula1239
@rohithbathula1239 16 күн бұрын
Phenomenal explanation no body explain like you thank you so much🎉
@hari7110
@hari7110 4 ай бұрын
Bro your teaching is awesome!
@nitishm1274
@nitishm1274 4 ай бұрын
i strong requrest you to continue the series best one please continue the series
@arjunreddy2170
@arjunreddy2170 11 ай бұрын
Awesome explanation
@user-vs7bb8xm2m
@user-vs7bb8xm2m 4 ай бұрын
very nicely explained and great visuals ❤❤
@payalsingh7238
@payalsingh7238 5 ай бұрын
Very nice visualization
@saksheepapadkar6087
@saksheepapadkar6087 10 ай бұрын
Great teaching 🎉
@grozageorge2887
@grozageorge2887 9 ай бұрын
Perfectly explained :)
@shivamjha6917
@shivamjha6917 2 ай бұрын
sir ..i have never seen as good as this video content..
@programmingpartner8624
@programmingpartner8624 4 ай бұрын
Perfect explanation!!!!!💯💯💯💯💯
@richatripathi5919
@richatripathi5919 Жыл бұрын
awesome explanation
@EngineerbyFate
@EngineerbyFate 24 күн бұрын
Hi Rohit Sir, Please continue the series other data structure as well.
@ms_007_
@ms_007_ Ай бұрын
your teaching is like a Magician..
@naag4852
@naag4852 10 ай бұрын
Best Explanation 😮
@shaikshafiulla684
@shaikshafiulla684 Ай бұрын
Sir your explaination is just looking like woww
@azadchauhan963
@azadchauhan963 2 ай бұрын
This channel should have million subscriber
@shubhampatidar3815
@shubhampatidar3815 Жыл бұрын
i love your teaching style ....you are awesome .
@travelpayya2668
@travelpayya2668 Жыл бұрын
Sir😂😂 nice
@Heroff_123
@Heroff_123 16 күн бұрын
Best tutorial I ever watched 😃😊
@gagugaganashree7879
@gagugaganashree7879 Жыл бұрын
Amazing sir
@smrutinayak2628
@smrutinayak2628 20 күн бұрын
great explanantion
@crankyysalt6963
@crankyysalt6963 2 ай бұрын
the besttt sirrrrr keepp goingggg🎉❤❤❤
@twishanuaichroy1938
@twishanuaichroy1938 5 ай бұрын
Wonderful ❤
@7smessi803
@7smessi803 9 ай бұрын
Vera level sir❤️
@AnkiD-ub2ju
@AnkiD-ub2ju 5 ай бұрын
Best explanation
@user-yn6js2xh9z
@user-yn6js2xh9z 6 ай бұрын
brilliant🙌🙌
@invinciblevikas9553
@invinciblevikas9553 Жыл бұрын
excellent
@206_dindayalpatra3
@206_dindayalpatra3 Ай бұрын
Thank you ❤
@HarshKumar-nf7xr
@HarshKumar-nf7xr 11 ай бұрын
This guy is awsome, the way he teaches even a donkey can understand
@manulovanshi8638
@manulovanshi8638 4 ай бұрын
thank you sir....
@Tech_most
@Tech_most 4 ай бұрын
Thank you u sir
@viewer_evgeniy
@viewer_evgeniy 7 ай бұрын
That's awesome! But how to achieve all of it without using loops? :)
@syamprasadupputalla8233
@syamprasadupputalla8233 9 ай бұрын
Thanks you
@user-lh5tq7jd3r
@user-lh5tq7jd3r Жыл бұрын
mast video hai
@user-zz2ln4dc4u
@user-zz2ln4dc4u 5 ай бұрын
if you try on array of 3 elements and rotations as -4, the above code will fail. As 2nd call to reverse function --> reverse(a,-1,2), will fail as the array is out of bounds. As it can't start with index -1. So any rotation to the right (-ve number), which is greater than the length of Array is going to fail with the above reason.
@uttamsahu8224
@uttamsahu8224 8 ай бұрын
lit sir💥
@UtkarshOjha
@UtkarshOjha 5 ай бұрын
Best video found on this question, no-one on KZbin has covered this topic and made easy to understand, thanks man ,
@ankurmandal8899
@ankurmandal8899 2 ай бұрын
It is me...? Or you can also see that, he looks like KL Rahul...😅 By the way your teaching style and presentation is very good... keep it up sir..🎉
@jayanksingh4852
@jayanksingh4852 7 ай бұрын
Sir, Learning DSA from you is like watching Marvel's Movie;
@Cryengineers8205
@Cryengineers8205 10 ай бұрын
damn good 😇
@aniketrawal4961
@aniketrawal4961 4 ай бұрын
How we can do by java 8 Stream api ??
@karthickjayaraman2090
@karthickjayaraman2090 Жыл бұрын
Who are you man? Awesome explanation… reply to my comment
@abhishekkr8077
@abhishekkr8077 10 ай бұрын
@karthickjayaraman2090 he is one of the best teacher bro,I am his student.His full name is Rabindra Rohit.We call him Rohit sir. He has his institute in Bangalore named Tap Academy in BTM layout area
@user-vf3eg3wt1p
@user-vf3eg3wt1p 3 ай бұрын
❤❤❤❤❤❤❤❤❤❤
@athiyastudies
@athiyastudies 9 ай бұрын
public class Solution { public int[] solve(int[] A, int B) { B=B%A.length; for(int j=1;j
@harargeetube9807
@harargeetube9807 7 ай бұрын
if condition for b
@saisooryamarri4042
@saisooryamarri4042 9 ай бұрын
Damn Anirudh Ravichander teaches a nice coding apart from music
@Entertainment.Tube0
@Entertainment.Tube0 Жыл бұрын
Awesome
@Entertainment.Tube0
@Entertainment.Tube0 Жыл бұрын
❤❤❤❤❤ 💯
TRY NOT TO LAUGH 😂
00:56
Feinxy
Рет қаралды 13 МЛН
Чай будешь? #чайбудешь
00:14
ПАРОДИИ НА ИЗВЕСТНЫЕ ТРЕКИ
Рет қаралды 2,9 МЛН
every good programmer should know how to code this data structure (its easy)
21:08
Learn Web Development And ACTUALLY Get A Job | Ultimate Guide
1:33:52
James Cross
Рет қаралды 1,2 МЛН
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 600 М.
The Last Algorithms Course You'll Need by ThePrimeagen | Preview
16:44
Frontend Masters
Рет қаралды 303 М.
Java Program to left rotate the elements of an array
9:04
Code With Murad
Рет қаралды 31 М.