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

Поділитися
Вставка
  • Опубліковано 14 лис 2024

КОМЕНТАРІ • 195

  • @aarishfaiz7880
    @aarishfaiz7880 9 місяців тому +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.

  • @manjushapatade5506
    @manjushapatade5506 2 роки тому +10

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

  • @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.

  • @vivekbhore5722
    @vivekbhore5722 2 роки тому +19

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

  • @MH11_optimistic
    @MH11_optimistic 2 роки тому +5

    U made my coding journey easy❤️

  • @raunakgupta5528
    @raunakgupta5528 Місяць тому +1

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

  • @shrikrishnacrafts6100
    @shrikrishnacrafts6100 Місяць тому +1

    Thank You Ma'am 🙏🙏🙏🙏🙏

  • @nn_yt24
    @nn_yt24 2 роки тому +12

    THE BEST TEACHER
    THE BEST CONTENT
    JUST GRATEFUL ❤️

  • @itsfunnytime1693
    @itsfunnytime1693 2 роки тому +1

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

  • @nasimaaktar7193
    @nasimaaktar7193 2 роки тому +17

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

  • @susheellattala9498
    @susheellattala9498 Рік тому +4

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

  • @onlineworld3838
    @onlineworld3838 3 роки тому +1

    Didi I i really inspired from your videos

  • @sanjaykumar-bb1
    @sanjaykumar-bb1 11 місяців тому +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
    }

  • @kanailalmanna5005
    @kanailalmanna5005 3 роки тому +4

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

  • @shamsher556
    @shamsher556 3 роки тому +1

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

  • @sindhujamaram5845
    @sindhujamaram5845 2 роки тому +11

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

  • @uchihaPrincessSakura
    @uchihaPrincessSakura 3 роки тому +1

    Didi nice explanation of Reverse a linked list

  • @PiyushAnand-td3fl
    @PiyushAnand-td3fl 9 місяців тому

    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;
    }

  • @explainco.1388
    @explainco.1388 3 роки тому +2

    Love from tripura

  • @rajeshgoudkatnam1819
    @rajeshgoudkatnam1819 6 місяців тому

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

  • @continnum_radhe-radhe
    @continnum_radhe-radhe 2 роки тому +1

    Thank you very much 🔥🔥🔥

  • @bhavyamendiratta4196
    @bhavyamendiratta4196 5 місяців тому

    thanks, best explanation

  • @mudassershahzad3628
    @mudassershahzad3628 2 роки тому +1

    Best explanation 👍

  • @jayaraj5479
    @jayaraj5479 2 роки тому +1

    Very well explained!

  • @hareeshkumar7570
    @hareeshkumar7570 Рік тому +5

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

  • @mdfoysalahmed4612
    @mdfoysalahmed4612 2 роки тому

    Thanks for the recursive...

  • @abhayrajbhar9333
    @abhayrajbhar9333 3 роки тому +4

    Technology is future.

    • @killer7495
      @killer7495 2 роки тому

      Apna college is present

  • @shwetanksudhanshu4383
    @shwetanksudhanshu4383 2 роки тому +1

    very nice explanation..please continue this series again

  • @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

  • @sameerkhan-xu4ve
    @sameerkhan-xu4ve 3 роки тому +1

    Di apna ek personal channel bnaiye

  • @md.nahidulalamchowdhury9568
    @md.nahidulalamchowdhury9568 2 роки тому

    Thanks a lot, mam.

  • @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 ?

  • @plutomessi21
    @plutomessi21 Рік тому

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

  • @shvaibkhan4389
    @shvaibkhan4389 2 роки тому +1

    Is this complete series with all datastructure and algorithm

  • @shreyasingh4680
    @shreyasingh4680 2 роки тому

    Thanks di!

  • @Rieshu-l9i
    @Rieshu-l9i 8 місяців тому

    #Apna College & shradda didi rocks

  • @dotencoma
    @dotencoma Рік тому

    Thank You😇

  • @helikshukla5841
    @helikshukla5841 3 роки тому +3

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

  • @rakeshsahoo2509
    @rakeshsahoo2509 Рік тому

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

  • @moju3526
    @moju3526 3 роки тому +1

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

  • @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

  • @mahadevhulsure9669
    @mahadevhulsure9669 9 місяців тому

    One shot for double linked list please

  • @ujjawaldewangan8345
    @ujjawaldewangan8345 3 роки тому

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

  • @aniketmishra71
    @aniketmishra71 3 роки тому

    Thank You!

  • @Rpshortsvideo1997
    @Rpshortsvideo1997 3 роки тому

    plz i want more video of java

  • @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

  • @oppoplayer7203
    @oppoplayer7203 3 роки тому +1

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

  • @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.

  • @priyanshu_rana
    @priyanshu_rana 3 роки тому +2

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

  • @satyamevjayate3740
    @satyamevjayate3740 3 роки тому

    Make a vedio for java programming in moblie

  • @abhishek3218
    @abhishek3218 3 роки тому +1

    Pls do review of jss noida and gl bajaj

  • @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.

  • @infinite639
    @infinite639 2 роки тому

    circular and dobuly linked list

  • @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.

  • @MajinBuu45
    @MajinBuu45 2 роки тому

    Thank you

  • @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

  • @surajpandey741
    @surajpandey741 10 місяців тому +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.

  • @ayshwaryakatheria9366
    @ayshwaryakatheria9366 Рік тому

    Is there any video on LinkedHashMap

  • @adityadhoble7396
    @adityadhoble7396 3 роки тому +2

    Which book should I refer for JAVA as a beginner ?

    • @siddharthsingh2859
      @siddharthsingh2859 2 роки тому +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)

  • @hometvfirestick
    @hometvfirestick 2 роки тому

    Thanks

  • @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 3 місяці тому +1

      Sometimes interviewers ask to create a linked list from scratch

  • @RajveerSingh-pr2ol
    @RajveerSingh-pr2ol 3 роки тому +31

    Di ek video C++ Vs Java

  • @deepeshraghuwanshi7190
    @deepeshraghuwanshi7190 2 роки тому +1

    Why we didn't use collection framework here

  • @kainaatmakhani6550
    @kainaatmakhani6550 2 роки тому

    good job

  • @ruchitasalekar4956
    @ruchitasalekar4956 3 роки тому +2

    00:10 she was talking about 'Algoexpert'😂

  • @komaltiwari1903
    @komaltiwari1903 6 місяців тому

    How to reverse linked list using collection framework??

  • @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‼️

  • @chemtube3852
    @chemtube3852 3 роки тому

    Java key liya kunsa book acha hoga??

  • @MH11_optimistic
    @MH11_optimistic 2 роки тому

    Mam please share most ask coding que for software testing

  • @asadullahallmamun3192
    @asadullahallmamun3192 2 роки тому

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

  • @Whyycom
    @Whyycom Рік тому

    Huge respect china❤️

  • @chemtube3852
    @chemtube3852 3 роки тому

    Ek video book key upar for coding

  • @rattanjotsingh2483
    @rattanjotsingh2483 3 роки тому

    great!

  • @Ayush-mn8jz
    @Ayush-mn8jz Рік тому

    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.

  • @tejasveer9179
    @tejasveer9179 3 роки тому +1

    CDAC VIDEO 💯💯

  • @RitwikMandal
    @RitwikMandal 2 місяці тому

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

  • @swarna6384
    @swarna6384 3 роки тому

    Is there any data structure course I this channel?

  • @prathamgupta1632
    @prathamgupta1632 2 роки тому

    double aand circular linklist?

  • @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

  • @tanushree2675
    @tanushree2675 Рік тому

    solution of previous homework problem

  • @nishant0312
    @nishant0312 3 місяці тому

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

  • @Piyush71919
    @Piyush71919 3 роки тому

    Thnx

  • @Know_Youself
    @Know_Youself Рік тому

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

  • @rahulf8775
    @rahulf8775 3 роки тому +1

    Tanku

  • @crackexamvibes8267
    @crackexamvibes8267 3 роки тому +2

    Hi everyone

  • @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
    ?

  • @rushikeshgavhane4795
    @rushikeshgavhane4795 6 місяців тому

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

  • @shubhiofficial1629
    @shubhiofficial1629 3 роки тому +3

    Didi I took bsc maths in Hindu College . Should I learn coding and how it will help me

  • @mohdsameer2445
    @mohdsameer2445 Рік тому

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

  • @dancingindia24
    @dancingindia24 2 роки тому

    how to reverse circular linked list

  • @VaibhawSingh-hz5tm
    @VaibhawSingh-hz5tm Рік тому

    where I get DSA course

  • @anilptl
    @anilptl 2 роки тому

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

  • @aniketkeshri226
    @aniketkeshri226 3 роки тому

    when will next video launch??

  • @masoomraza5155
    @masoomraza5155 3 роки тому

    cost is pure red investment

  • @edu-amplifier2451
    @edu-amplifier2451 3 роки тому +1

    Please make a review video on NIT Jalandhar. 🙏

  • @iqbalhossain927
    @iqbalhossain927 2 роки тому

    Please try to upload lectures a little fast

  • @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

  • @utkarshtiwari1769
    @utkarshtiwari1769 2 роки тому

    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

  • @jankiparmar7014
    @jankiparmar7014 3 роки тому +1

    Hlo di, how can i fulfill minimum system requirements of windows 10..