How to Reverse a Linked List? | Iterative + Recursive | Java Placement Course

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

Комментарии • 197

  • @manjushapatade5506
    @manjushapatade5506 2 года назад +11

    these sessions help me a lot to learn java..hats up guys

  • @aarishfaiz7880
    @aarishfaiz7880 Год назад +3

    Mam You are Really the best Instructor, Really your way makes DSA very easy Hope I will Meet you some day to say this to you.

  • @sameerhussain1112
    @sameerhussain1112 2 года назад +7

    mam thank you so much for this wonderful course . i studied my whole DS course from your videos . mam sending you a lot of love from Pakistan.

  • @MH11_optimistic
    @MH11_optimistic 2 года назад +5

    U made my coding journey easy❤️

  • @vivekbhore5722
    @vivekbhore5722 3 года назад +19

    thanks a lot
    need more videos on bst, graphs, implementations and algorithms :)

  • @nn_yt24
    @nn_yt24 2 года назад +13

    THE BEST TEACHER
    THE BEST CONTENT
    JUST GRATEFUL ❤️

  • @sindhujamaram5845
    @sindhujamaram5845 2 года назад +11

    Very nice explanation didi, please continue the java placement series (trees, graphs).

  • @kanailalmanna5005
    @kanailalmanna5005 3 года назад +4

    Thank you so much Aman bhaiya , Shradha di and all team members

  • @nasimaaktar7193
    @nasimaaktar7193 3 года назад +17

    Thank you, mam.If you can please make videos on advanced java. your lecture was very helpful to me.

  • @susheellattala9498
    @susheellattala9498 Год назад +5

    for (int i =list.size()-1; i >= 0 ; i--) {
    int temp=list.get(i) ;
    list.addLast(temp);
    list.remove(i);
    }
    System.out.println(list);
    //this is also working in Single ended Linked list

    • @Gg69696
      @Gg69696 Год назад +1

      Wah genius !! !! 😮

    • @Gg69696
      @Gg69696 Год назад +1

      Ek baar batao mera code toh instead of answer... Garbage value return kr rha hai 😢
      Kaise Roku isse.....
      Mai bhi vs Code use krta hoon.....

  • @itsfunnytime1693
    @itsfunnytime1693 3 года назад +1

    ❤️❤️ you dii bss aap jldi jldi video uploaded kro please 🙏🙏

  • @PiyushAnand-td3fl
    @PiyushAnand-td3fl Год назад

    12:20
    easy logic -->
    public void reverseList(){
    if(head == null || head.next == null){
    return;
    }
    Node prevNode = null;
    Node currNode = head;
    Node nextNode = null;
    while(currNode != null){
    nextNode = currNode.next;
    currNode.next = prevNode;
    prevNode = currNode;
    currNode = nextNode;
    }
    head = prevNode;
    }

  • @shamsher556
    @shamsher556 3 года назад +1

    Linked List bahut good laga
    Thanks you so much didi ❤️❤️😗

  • @shrikrishnacrafts6100
    @shrikrishnacrafts6100 3 месяца назад +1

    Thank You Ma'am 🙏🙏🙏🙏🙏

  • @sanjaykumar-bb1
    @sanjaykumar-bb1 Год назад +1

    If you initiate your currentNode from head, then there is no need to check corner cases for an empty list or a list with only one element
    public static void reverseLLIteratively(){
    Node previousNode = null;
    Node currentNode = head; // Starts from the head of the list
    Node nextNode ;
    while (currentNode != null){
    nextNode = currentNode.next; // Store the next node in the list
    currentNode.next = previousNode; // Reverse the pointer
    // update
    previousNode = currentNode; // Update the previous node
    currentNode = nextNode; // Move to the next node
    }
    head = previousNode; // Update the head to the new start of the reversed list
    }

  • @uchihaPrincessSakura
    @uchihaPrincessSakura 3 года назад +1

    Didi nice explanation of Reverse a linked list

  • @hareeshkumar7570
    @hareeshkumar7570 Год назад +5

    Thank you Ma'am.
    Make a complete playlist on python please.
    Your way of teaching is very nice.
    Rather than others.

  • @shwetanksudhanshu4383
    @shwetanksudhanshu4383 2 года назад +1

    very nice explanation..please continue this series again

  • @mudassershahzad3628
    @mudassershahzad3628 2 года назад +1

    Best explanation 👍

  • @continnum_radhe-radhe
    @continnum_radhe-radhe 2 года назад +1

    Thank you very much 🔥🔥🔥

  • @onlineworld3838
    @onlineworld3838 3 года назад +1

    Didi I i really inspired from your videos

  • @abhayrajbhar9333
    @abhayrajbhar9333 3 года назад +4

    Technology is future.

    • @killer7495
      @killer7495 2 года назад

      Apna college is present

  • @helikshukla5841
    @helikshukla5841 3 года назад +3

    Make a video on difference between data science and data analytics👍

  • @NotASus-u4f
    @NotASus-u4f 4 месяца назад +1

    SHORTCUT:
    LinkedList x = new LinkedList();
    x.add
    x.add
    x.add
    use- Collections.reverse(x);
    It will reverse linked list in one step...

  • @16avikasgupta70
    @16avikasgupta70 2 года назад

    One thing that i felt was that you were explaining how to solve this problem rather than explaining the intution behind it please try to inculcate that aslo otherwise very good explaination

  • @jayaraj5479
    @jayaraj5479 2 года назад +1

    Very well explained!

  • @Yogitmamania-03
    @Yogitmamania-03 2 года назад

    mam next time agr aap reverse link list pr vedio bnaye toh pls orginal link list jese dikhti hain na like boxes proper or address dale hue hote hain pls proper manner main smjhna kyunki thoda typical tpoic lgta h mujhe ye thoda understanding bhi deeply ho jati hain orginal linklist se may be

  • @explainco.1388
    @explainco.1388 3 года назад +2

    Love from tripura

  • @rajeshgoudkatnam1819
    @rajeshgoudkatnam1819 8 месяцев назад

    If you create a node( nextNode) in the loop for each iteration . May be Space complexity will be O(n)

  • @bhavyamendiratta4196
    @bhavyamendiratta4196 8 месяцев назад

    thanks, best explanation

  • @spoider_man
    @spoider_man Месяц назад

    Data structure means making manual classes & method to perform certain action...

  • @rakeshsahoo2509
    @rakeshsahoo2509 2 года назад

    Nice , explanation . I was not able to understand previously. Now i am able to understand. God bless you Shradha didi

  • @plutomessi21
    @plutomessi21 Год назад

    Thank you so much didi watched alot of videos, asked my friend but still was confused
    Thank you again 🙏

  • @sameerkhan-xu4ve
    @sameerkhan-xu4ve 3 года назад +1

    Di apna ek personal channel bnaiye

  • @Rieshu-l9i
    @Rieshu-l9i 11 месяцев назад

    #Apna College & shradda didi rocks

  • @talhatanveer8719
    @talhatanveer8719 2 года назад +1

    private void printreverse(Node current) {
    // TODO Auto-generated method stub
    if(current!=null) {

    printreverse(current.getNext());

    System.out.println(current.getData());






    }
    this is a sharp way to print a linked list in reverse oder

  • @mdfoysalahmed4612
    @mdfoysalahmed4612 2 года назад

    Thanks for the recursive...

  • @dotencoma
    @dotencoma Год назад

    Thank You😇

  • @oppoplayer7203
    @oppoplayer7203 3 года назад +1

    Please teach c++ in one video full large video by microsoft wali didi only 🤟 pakka

  • @ujjawaldewangan8345
    @ujjawaldewangan8345 3 года назад

    didi vedio ki frequency badhao
    because its is better then c++ due to pen paper

  • @moju3526
    @moju3526 3 года назад +2

    I love to learn coding (Data Science) but unfortunately I don't have Laptop Or Desktop.

  • @shivram16
    @shivram16 Месяц назад

    Thank you mam

  • @shvaibkhan4389
    @shvaibkhan4389 2 года назад +1

    Is this complete series with all datastructure and algorithm

  • @tejasveer9179
    @tejasveer9179 3 года назад +1

    CDAC VIDEO 💯💯

  • @shreyasingh4680
    @shreyasingh4680 2 года назад

    Thanks di!

  • @md.nahidulalamchowdhury9568
    @md.nahidulalamchowdhury9568 2 года назад

    Thanks a lot, mam.

  • @mahadevhulsure9669
    @mahadevhulsure9669 Год назад

    One shot for double linked list please

  • @SohailAhmed-sy8xh
    @SohailAhmed-sy8xh 3 года назад +1

    make Video on the topic ke Software Engineering men jo minor or compulsory subjects hai unka koi faeeda hai ? Like Calculs , Basic Electronics , Digital logic Desing , Discrete Structure and Probility Statsitics ?

  • @aniketmishra71
    @aniketmishra71 3 года назад

    Thank You!

  • @hopes_alive-100
    @hopes_alive-100 3 года назад

    ⚠️ Didi, MACHINE LEARNING bhi padhana start kariye please channel p
    🥺🥺‼️
    Edit - bhut jyadaa gratitude feel karege, Aman bhaiya aur aapke liye. Please please please‼️

  • @RajveerSingh-pr2ol
    @RajveerSingh-pr2ol 3 года назад +31

    Di ek video C++ Vs Java

    • @sameertambolitybcs6338
      @sameertambolitybcs6338 3 года назад +9

      There is no need,Java❤️

    • @null_cmd
      @null_cmd 3 года назад +3

      C++ is the best boi

    • @sameertambolitybcs6338
      @sameertambolitybcs6338 3 года назад +1

      @@null_cmd you are on wrong path.

    • @null_cmd
      @null_cmd 3 года назад +1

      @@sameertambolitybcs6338 nope bro, u will not decide for me to take which path

    • @sameertambolitybcs6338
      @sameertambolitybcs6338 3 года назад

      @@null_cmd So you'll also not decide and say that c++ is best and all that.

  • @Whyycom
    @Whyycom 2 года назад

    Huge respect china❤️

  • @adityadhoble7396
    @adityadhoble7396 3 года назад +2

    Which book should I refer for JAVA as a beginner ?

    • @siddharthsingh2859
      @siddharthsingh2859 3 года назад +7

      Brother, I think if you follow some tutorial or playlist from any YT channel, that's enough, book not needed.(its my personal opinion)

  • @herryhar3407
    @herryhar3407 3 года назад +5

    hey, I completed my bachelor's degree in mechanical engineering (2021 pass out), now for the master study in the USA I have to apply in MS SOFTWARE ENGINEERING, but I don't have any idea where to start learning it. I learned Basic C programming in my 1st year of college like prime numbers, basic maths, pattern making, etc. So suggest me a path to learn it. And which things I have to learn for MS SOFTWARE ENGINEERING.

  • @ruchitasalekar4956
    @ruchitasalekar4956 3 года назад +2

    00:10 she was talking about 'Algoexpert'😂

  • @priyanshu_rana
    @priyanshu_rana 3 года назад +2

    Didi please make a video about rodemap of how to become a software engineer. Please didi

  • @kainaatmakhani6550
    @kainaatmakhani6550 2 года назад

    good job

  • @MajinBuu45
    @MajinBuu45 3 года назад

    Thank you

  • @5ksubscriberschallengewith675
    @5ksubscriberschallengewith675 3 года назад +3

    Didi aapka c++ course bhot acha hai but usme last ki kuch videos hide hai aur last ki kuch mujhe show nhi ho rhi what can I do? Please help me.

  • @Rpshortsvideo1997
    @Rpshortsvideo1997 3 года назад

    plz i want more video of java

  • @satyamevjayate3740
    @satyamevjayate3740 3 года назад

    Make a vedio for java programming in moblie

  • @manandeedwaniya9756
    @manandeedwaniya9756 3 года назад

    Didi plese make video , What is coding
    Some basic knowledge on coding how can we make apps ( From A to Z )
    PLESE.

  • @hometvfirestick
    @hometvfirestick 2 года назад

    Thanks

  • @surajpandey741
    @surajpandey741 Год назад +1

    when i am soving problems of leet code or hackerrank i am not able to solve the problems with the help of collections its showing error.

  • @MH11_optimistic
    @MH11_optimistic 2 года назад

    Mam please share most ask coding que for software testing

  • @abhishek3218
    @abhishek3218 3 года назад +1

    Pls do review of jss noida and gl bajaj

  • @infinite639
    @infinite639 2 года назад

    circular and dobuly linked list

  • @arunrawat2142
    @arunrawat2142 2 года назад +9

    Pls Help: Is LinkedList-Scratch necessary or collections are enough?

    • @user-xi5wb3rn7u
      @user-xi5wb3rn7u 2 года назад +1

      Look! for better understanding the concept of how things are working in the background you must know it from scratch this will be very helpful for you for solving questions on programming.

    • @supraja8286
      @supraja8286 2 года назад

      @@user-xi5wb3rn7u In coding round for placements can we use collections.I solved this by traversing it from reverse and printed.Is it okay.

    • @vickysharma5997
      @vickysharma5997 6 месяцев назад +1

      Sometimes interviewers ask to create a linked list from scratch

  • @ayshwaryakatheria9366
    @ayshwaryakatheria9366 Год назад

    Is there any video on LinkedHashMap

  • @rattanjotsingh2483
    @rattanjotsingh2483 3 года назад

    great!

  • @kanailalmanna5005
    @kanailalmanna5005 3 года назад +1

    GSoC 2022 me select ho paunga keya by only this course ????

  • @anujnegi8474
    @anujnegi8474 2 года назад +1

    Doubly or circular linked list nhi h playlist m

  • @deepeshraghuwanshi7190
    @deepeshraghuwanshi7190 3 года назад +1

    Why we didn't use collection framework here

  • @komaltiwari1903
    @komaltiwari1903 9 месяцев назад

    How to reverse linked list using collection framework??

  • @Ayush-mn8jz
    @Ayush-mn8jz 2 года назад

    This playlist looks randomly arranged. Can anyone please let me know which video is first to watch in the playlist, which video is second, till last video. I know the content is good.

  • @asadullahallmamun3192
    @asadullahallmamun3192 2 года назад

    Need more video and explanation with debug the memory how to work it's help us please didi

  • @Piyush71919
    @Piyush71919 3 года назад

    Thnx

  • @masoomraza5155
    @masoomraza5155 3 года назад

    my limit is that i can grasp algorithms of cormen understand kevin naughton jr youtuber problems
    and data structures of cormen 100%
    if you are 200% then only you are better than me

  • @rahulf8775
    @rahulf8775 3 года назад +1

    Tanku

  • @chemtube3852
    @chemtube3852 3 года назад

    Ek video book key upar for coding

  • @anilptl
    @anilptl 2 года назад

    T 2:30 aren't we supposed to do that with only doubly linked list

  • @rushikeshgavhane4795
    @rushikeshgavhane4795 9 месяцев назад

    Not understand didi.. please explain dry run of code also.. so we can understand.. what is previous Ani current on graph

  • @nishant0312
    @nishant0312 6 месяцев назад

    We can also use collections.reverse(list) method is it correct

  • @P_R_lovebird
    @P_R_lovebird Год назад

    Nicely 🤦didi

  • @swarna6384
    @swarna6384 3 года назад

    Is there any data structure course I this channel?

  • @NadeemKhan-vp5qx
    @NadeemKhan-vp5qx 3 года назад +4

    Is this method is correct for reversing a linked list ?
    void reverseIterate() {
    Node current = head;
    Node prev = null;
    while(current != null) {
    Node nextNode = current.next;
    current.next = prev;
    prev = current;
    current = nextNode;
    }
    head = prev;
    }

    • @sankalpsoni5021
      @sankalpsoni5021 3 года назад +2

      Yeah... Its correct

    • @abdurrab8947
      @abdurrab8947 2 года назад +3

      Much better than what she told in video.

    • @aniketsrivastava1870
      @aniketsrivastava1870 2 года назад

      kay likha h pura blunder🤣🤣🤣

    • @AmitRaj-ds7tx
      @AmitRaj-ds7tx Год назад

      ​@@aniketsrivastava1870 go and learn 10th you don't deserve coding 😂

    • @aniketsrivastava1870
      @aniketsrivastava1870 Год назад

      @@AmitRaj-ds7tx daswi fail tu bataega mujhe coding woh toh mene sarcasm mein likh diya tha I didn't mean it ja jake for loop padh smjha unpadh

  • @tanushree2675
    @tanushree2675 Год назад

    solution of previous homework problem

  • @chemtube3852
    @chemtube3852 3 года назад

    Java key liya kunsa book acha hoga??

  • @Sachin-wt9eo
    @Sachin-wt9eo 3 года назад

    दीदी,
    Software Engineer students को placement‌ के लिए अलग से पढ़ने की जरूरत क्यों होती है?? क्या college study students को placement‌ ready नहीं बनाती है??

    • @ashishkumar-fd4gp
      @ashishkumar-fd4gp 3 года назад +1

      nhi bhai nhi bnte

    • @Sachin-wt9eo
      @Sachin-wt9eo 3 года назад

      @@ashishkumar-fd4gp kyon bhaiya

    • @ashishkumar-fd4gp
      @ashishkumar-fd4gp 3 года назад +2

      @@Sachin-wt9eo kyuki woh updated course nhi hta h jo company mein use hta h comapnies abh new software new chijo mein aage ah gyi h or wohi clg ki book abhi bhi 7/8 saal purni chij prda rhi h

  • @crackexamvibes8267
    @crackexamvibes8267 3 года назад +2

    Hi everyone

  • @Know_Youself
    @Know_Youself Год назад

    In Java push method is there .no need all this.

  • @edu-amplifier2451
    @edu-amplifier2451 3 года назад +1

    Please make a review video on NIT Jalandhar. 🙏

  • @masoomraza5155
    @masoomraza5155 3 года назад

    cost is pure red investment

  • @prathamgupta1632
    @prathamgupta1632 2 года назад

    double aand circular linklist?

  • @RitwikMandal
    @RitwikMandal 4 месяца назад

    how the recursive function is working in the reverse linked list program can anyone explain please🙏

  • @utkarshtiwari1769
    @utkarshtiwari1769 3 года назад

    Why we are doing Question in online compiler it is gating so difficult to us to find that same question
    And then we don't have record of it
    Already classes ban chuki hai first question of this video ab usmein shru se start ku nahi hai pahle se define hai
    Ab agar ham jaenge Apne offline compiler jo hamne download kar rakha usmein work Karen acche se tu bahut bahut difficult pad raha hai ham logon Ko
    Palli hi nahi padh raha question

  • @mohdsameer2445
    @mohdsameer2445 Год назад

    it was little confusing , should make another video with better explanations tbh mam

  • @iqbalhossain927
    @iqbalhossain927 2 года назад

    Please try to upload lectures a little fast

  • @VaibhawSingh-hz5tm
    @VaibhawSingh-hz5tm Год назад

    where I get DSA course

  • @CoddingMasti
    @CoddingMasti 3 года назад

    Hello didi
    Mere college me computer Science and engineering && computer Science and design ye 2 couse he to isme kitna difference Hoga
    ?
    Which is better
    ?