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

Sdílet
Vložit
  • čas přidán 2. 02. 2023
  • 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

Komentáře • 69

  • @AnkitKumar-mx1bl
    @AnkitKumar-mx1bl Před 2 dny

    Great Explanation by such a great educator

  • @sidsid7464
    @sidsid7464 Před 23 dny +1

    Such a amazing explanation

  • @khusheeranjan7848
    @khusheeranjan7848 Před 16 dny +1

    Best explanation....

  • @parulbhati2373
    @parulbhati2373 Před 26 dny

    best explanation ever

  • @shaikshafiulla684
    @shaikshafiulla684 Před 3 měsíci

    Sir your explaination is just looking like woww

  • @smrutinayak2628
    @smrutinayak2628 Před 2 měsíci

    great explanantion

  • @Heroff_123
    @Heroff_123 Před měsícem

    Best tutorial I ever watched 😃😊

  • @survivourff7014
    @survivourff7014 Před 20 dny

    Bro... Your videos are quite good... We'd be very happy if u create more dsa related topics

  • @crankyysalt6963
    @crankyysalt6963 Před 4 měsíci

    the besttt sirrrrr keepp goingggg🎉❤❤❤

  • @206_dindayalpatra3
    @206_dindayalpatra3 Před 3 měsíci

    Thank you ❤

  • @EngineerbyFate
    @EngineerbyFate Před 2 měsíci

    Hi Rohit Sir,
    Please continue the series other data structure as well.

  • @Tech_most
    @Tech_most Před 5 měsíci

    Thank you u sir

  • @jithindev9185
    @jithindev9185 Před měsícem +2

    Only 934 likes .
    It deserves more . This channel is gem compared to other CZcams gurus with 1 year exp,2 year exp in it industry having minimal knowledge

  • @jayprakashKumar-hp3hw
    @jayprakashKumar-hp3hw Před rokem +15

    He is such a phenomenal guy educating DSA in a simple and smooth way.

  • @gauribhosale8712
    @gauribhosale8712 Před 10 měsíci +10

    I have gone through the many DsA series on CZcams and other platforms too. But seriously this is the best channel I have ever found to learn DSA.

  • @rutikbodkeacademy1247
    @rutikbodkeacademy1247 Před 8 měsíci +5

    This type of explantion never got anywhere, thank you for making such kind of video

  • @payalsingh7238
    @payalsingh7238 Před 6 měsíci +1

    Very nice visualization

  • @ms_007_
    @ms_007_ Před 2 měsíci

    your teaching is like a Magician..

  • @hari7110
    @hari7110 Před 5 měsíci +1

    Bro your teaching is awesome!

  • @programmingpartner8624
    @programmingpartner8624 Před 5 měsíci +2

    Perfect explanation!!!!!💯💯💯💯💯

  • @user-vs7bb8xm2m
    @user-vs7bb8xm2m Před 5 měsíci +2

    very nicely explained and great visuals ❤❤

  • @tamilmukbang3789
    @tamilmukbang3789 Před 5 měsíci +1

    Thank you so much. i understood the concept very well

  • @nallapatiDeepak-bl3wx
    @nallapatiDeepak-bl3wx Před rokem +10

    The Best video I have ever seen on a DSA, Thanks a lot sir for the effort you put in making the concept clear.

  • @tejassalunkheofficial
    @tejassalunkheofficial Před 6 měsíci +1

    Best explanation sir ❤
    Very clear explanation with super clarity of concepts

  • @raam2508
    @raam2508 Před 3 měsíci

    Definitely the best explanation by any DSA tutor I have ever seen on CZcams !!

  • @ankurmandal8899
    @ankurmandal8899 Před 3 měsíci

    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..🎉

  • @PathanVlogs098
    @PathanVlogs098 Před 3 měsíci

    This explanation is wise and can be understandable to 1st class students too..best explanation ever i heard in my life.

  • @vishnubj826
    @vishnubj826 Před 5 měsíci +1

    The way he is teaching and pictorial representation is quite cool and easy to understand

  • @arjunreddy2170
    @arjunreddy2170 Před rokem +2

    Awesome explanation

  • @rohithbathula1239
    @rohithbathula1239 Před měsícem

    Phenomenal explanation no body explain like you thank you so much🎉

  • @Hasan_770
    @Hasan_770 Před 9 měsíci +1

    Respect for him. Best explanation and best quality content.

  • @nitishm1274
    @nitishm1274 Před 5 měsíci +1

    i strong requrest you to continue the series best one please continue the series

  • @azadchauhan963
    @azadchauhan963 Před 4 měsíci

    This channel should have million subscriber

  • @saksheepapadkar6087
    @saksheepapadkar6087 Před 11 měsíci +1

    Great teaching 🎉

  • @user-qr9uo5it2r
    @user-qr9uo5it2r Před 4 měsíci

    Really so amazing video i ever seen on youtube with great visual representation

  • @shubhampatidar3815
    @shubhampatidar3815 Před rokem +2

    i love your teaching style ....you are awesome .

  • @user-dx8fw2dc6h
    @user-dx8fw2dc6h Před 7 měsíci +1

    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.

  • @mridulgarg2539
    @mridulgarg2539 Před rokem +2

    The underappreciated channel. Sir(bhaiya) wonderful explanation thanks.

  • @naag4852
    @naag4852 Před 11 měsíci +1

    Best Explanation 😮

  • @shivamjha6917
    @shivamjha6917 Před 3 měsíci

    sir ..i have never seen as good as this video content..

  • @richatripathi5919
    @richatripathi5919 Před rokem +1

    awesome explanation

  • @AnkiD-ub2ju
    @AnkiD-ub2ju Před 7 měsíci

    Best explanation

  • @Pradeepkumar-es8qm
    @Pradeepkumar-es8qm Před rokem +4

    Damn! Such a good explanation with the best teaching tools 🔥. Awesome

  • @user-zz2ln4dc4u
    @user-zz2ln4dc4u Před 6 měsíci

    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.

  • @grozageorge2887
    @grozageorge2887 Před 11 měsíci +1

    Perfectly explained :)

  • @twishanuaichroy1938
    @twishanuaichroy1938 Před 7 měsíci

    Wonderful ❤

  • @user-vf3eg3wt1p
    @user-vf3eg3wt1p Před 4 měsíci

    ❤❤❤❤❤❤❤❤❤❤

  • @user-lh5tq7jd3r
    @user-lh5tq7jd3r Před rokem +1

    mast video hai

  • @manulovanshi8638
    @manulovanshi8638 Před 5 měsíci

    thank you sir....

  • @user-yn6js2xh9z
    @user-yn6js2xh9z Před 7 měsíci

    brilliant🙌🙌

  • @HarshKumar-nf7xr
    @HarshKumar-nf7xr Před rokem +2

    This guy is awsome, the way he teaches even a donkey can understand

  • @gagugaganashree7879
    @gagugaganashree7879 Před rokem

    Amazing sir

  • @syamprasadupputalla8233
    @syamprasadupputalla8233 Před 10 měsíci

    Thanks you

  • @7smessi803
    @7smessi803 Před 10 měsíci

    Vera level sir❤️

  • @aniketrawal4961
    @aniketrawal4961 Před 5 měsíci

    How we can do by java 8 Stream api ??

  • @invinciblevikas9553
    @invinciblevikas9553 Před rokem

    excellent

  • @jayanksingh4852
    @jayanksingh4852 Před 8 měsíci

    Sir, Learning DSA from you is like watching Marvel's Movie;

  • @Cryengineers8205
    @Cryengineers8205 Před rokem +2

    damn good 😇

  • @uttamsahu8224
    @uttamsahu8224 Před 10 měsíci

    lit sir💥

  • @saisooryamarri4042
    @saisooryamarri4042 Před 10 měsíci +1

    Damn Anirudh Ravichander teaches a nice coding apart from music

  • @viewer_evgeniy
    @viewer_evgeniy Před 8 měsíci

    That's awesome! But how to achieve all of it without using loops? :)

  • @karthickjayaraman2090

    Who are you man? Awesome explanation… reply to my comment

    • @abhishekkr8077
      @abhishekkr8077 Před rokem +1

      @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

  • @UtkarshOjha
    @UtkarshOjha Před 6 měsíci

    Best video found on this question, no-one on CZcams has covered this topic and made easy to understand, thanks man ,

  • @athiyastudies
    @athiyastudies Před 10 měsíci

    public class Solution {
    public int[] solve(int[] A, int B) {
    B=B%A.length;
    for(int j=1;j

  • @Entertainment.Tube0
    @Entertainment.Tube0 Před rokem

    Awesome

  • @Entertainment.Tube0
    @Entertainment.Tube0 Před rokem

    ❤❤❤❤❤ 💯