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

  Рет қаралды 404,412

Apna College

Apna College

Күн бұрын

Пікірлер
@manjushapatade5506
@manjushapatade5506 2 жыл бұрын
these sessions help me a lot to learn java..hats up guys
@aarishfaiz7880
@aarishfaiz7880 10 ай бұрын
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.
@vivekbhore5722
@vivekbhore5722 2 жыл бұрын
thanks a lot need more videos on bst, graphs, implementations and algorithms :)
@sameerhussain1112
@sameerhussain1112 2 жыл бұрын
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 жыл бұрын
U made my coding journey easy❤️
@susheellattala9498
@susheellattala9498 Жыл бұрын
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 Жыл бұрын
Wah genius !! !! 😮
@Gg69696
@Gg69696 Жыл бұрын
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.....
@nn_yt24
@nn_yt24 2 жыл бұрын
THE BEST TEACHER THE BEST CONTENT JUST GRATEFUL ❤️
@sindhujamaram5845
@sindhujamaram5845 2 жыл бұрын
Very nice explanation didi, please continue the java placement series (trees, graphs).
@PiyushAnand-td3fl
@PiyushAnand-td3fl 10 ай бұрын
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; }
@insvikrant2668
@insvikrant2668 9 ай бұрын
Code showing error
@PiyushAnand-td3fl
@PiyushAnand-td3fl 9 ай бұрын
@@insvikrant2668 but its working fine for me
@itsfunnytime1693
@itsfunnytime1693 2 жыл бұрын
❤️❤️ you dii bss aap jldi jldi video uploaded kro please 🙏🙏
@kanailalmanna5005
@kanailalmanna5005 3 жыл бұрын
Thank you so much Aman bhaiya , Shradha di and all team members
@raunakgupta5528
@raunakgupta5528 2 ай бұрын
SHORTCUT: LinkedList x = new LinkedList(); x.add x.add x.add use- Collections.reverse(x); It will reverse linked list in one step...
@salmanpandey8150
@salmanpandey8150 2 ай бұрын
Then why learn full implementation
@nasimaaktar7193
@nasimaaktar7193 2 жыл бұрын
Thank you, mam.If you can please make videos on advanced java. your lecture was very helpful to me.
@SM10170
@SM10170 2 жыл бұрын
Teri mai kya bumar teri
@kishandixit8928
@kishandixit8928 2 жыл бұрын
+1
@worldofmanvik6913
@worldofmanvik6913 2 жыл бұрын
@@kishandixit8928 yes
@sanjaykumar-bb1
@sanjaykumar-bb1 Жыл бұрын
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 }
@shamsher556
@shamsher556 3 жыл бұрын
Linked List bahut good laga Thanks you so much didi ❤️❤️😗
@shrikrishnacrafts6100
@shrikrishnacrafts6100 2 ай бұрын
Thank You Ma'am 🙏🙏🙏🙏🙏
@abhayrajbhar9333
@abhayrajbhar9333 3 жыл бұрын
Technology is future.
@killer7495
@killer7495 2 жыл бұрын
Apna college is present
@uchihaPrincessSakura
@uchihaPrincessSakura 3 жыл бұрын
Didi nice explanation of Reverse a linked list
@explainco.1388
@explainco.1388 3 жыл бұрын
Love from tripura
@surajpandey741
@surajpandey741 11 ай бұрын
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.
@5ksubscriberschallengewith675
@5ksubscriberschallengewith675 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.
@RajveerSingh-pr2ol
@RajveerSingh-pr2ol 3 жыл бұрын
Di ek video C++ Vs Java
@sameertambolitybcs6338
@sameertambolitybcs6338 3 жыл бұрын
There is no need,Java❤️
@null_cmd
@null_cmd 3 жыл бұрын
C++ is the best boi
@sameertambolitybcs6338
@sameertambolitybcs6338 3 жыл бұрын
@@null_cmd you are on wrong path.
@null_cmd
@null_cmd 3 жыл бұрын
@@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.
@onlineworld3838
@onlineworld3838 3 жыл бұрын
Didi I i really inspired from your videos
@mudassershahzad3628
@mudassershahzad3628 2 жыл бұрын
Best explanation 👍
@shwetanksudhanshu4383
@shwetanksudhanshu4383 2 жыл бұрын
very nice explanation..please continue this series again
@jayaraj5479
@jayaraj5479 2 жыл бұрын
Very well explained!
@continnum_radhe-radhe
@continnum_radhe-radhe 2 жыл бұрын
Thank you very much 🔥🔥🔥
@rajeshgoudkatnam1819
@rajeshgoudkatnam1819 7 ай бұрын
If you create a node( nextNode) in the loop for each iteration . May be Space complexity will be O(n)
@ruchitasalekar4956
@ruchitasalekar4956 3 жыл бұрын
00:10 she was talking about 'Algoexpert'😂
@hareeshkumar7570
@hareeshkumar7570 Жыл бұрын
Thank you Ma'am. Make a complete playlist on python please. Your way of teaching is very nice. Rather than others.
@Rieshu-l9i
@Rieshu-l9i 9 ай бұрын
#Apna College & shradda didi rocks
@arunrawat2142
@arunrawat2142 2 жыл бұрын
Pls Help: Is LinkedList-Scratch necessary or collections are enough?
@user-xi5wb3rn7u
@user-xi5wb3rn7u 2 жыл бұрын
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 4 ай бұрын
Sometimes interviewers ask to create a linked list from scratch
@herryhar3407
@herryhar3407 3 жыл бұрын
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.
@krishapandeyviditya5595
@krishapandeyviditya5595 2 жыл бұрын
May I dear?
@krishapandeyviditya5595
@krishapandeyviditya5595 2 жыл бұрын
Ab nhi denge wala scene.. Abhi nhi tih kvi nhi?
@037_cse_jananir7
@037_cse_jananir7 Жыл бұрын
have u joined university?
@SohailAhmed-sy8xh
@SohailAhmed-sy8xh 3 жыл бұрын
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 🙏
@talhatanveer8719
@talhatanveer8719 2 жыл бұрын
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
@krishapandeyviditya5595
@krishapandeyviditya5595 2 жыл бұрын
Hein.. Kch vi.. Chide chota bcho ke sath hi chota bnna padata hawe
@helikshukla5841
@helikshukla5841 3 жыл бұрын
Make a video on difference between data science and data analytics👍
@krishapandeyviditya5595
@krishapandeyviditya5595 2 жыл бұрын
See on my channel dude
@shvaibkhan4389
@shvaibkhan4389 2 жыл бұрын
Is this complete series with all datastructure and algorithm
@bhavyamendiratta4196
@bhavyamendiratta4196 6 ай бұрын
thanks, best explanation
@RitwikMandal
@RitwikMandal 3 ай бұрын
how the recursive function is working in the reverse linked list program can anyone explain please🙏
@priyanshu_rana
@priyanshu_rana 3 жыл бұрын
Didi please make a video about rodemap of how to become a software engineer. Please didi
@mdfoysalahmed4612
@mdfoysalahmed4612 2 жыл бұрын
Thanks for the recursive...
@kanailalmanna5005
@kanailalmanna5005 3 жыл бұрын
GSoC 2022 me select ho paunga keya by only this course ????
@moju3526
@moju3526 3 жыл бұрын
I love to learn coding (Data Science) but unfortunately I don't have Laptop Or Desktop.
@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
@adityadhoble7396
@adityadhoble7396 3 жыл бұрын
Which book should I refer for JAVA as a beginner ?
@siddharthsingh2859
@siddharthsingh2859 2 жыл бұрын
Brother, I think if you follow some tutorial or playlist from any YT channel, that's enough, book not needed.(its my personal opinion)
@oppoplayer7203
@oppoplayer7203 3 жыл бұрын
Please teach c++ in one video full large video by microsoft wali didi only 🤟 pakka
@rakeshsahoo2509
@rakeshsahoo2509 Жыл бұрын
Nice , explanation . I was not able to understand previously. Now i am able to understand. God bless you Shradha didi
@sameerkhan-xu4ve
@sameerkhan-xu4ve 3 жыл бұрын
Di apna ek personal channel bnaiye
@shreyasingh4680
@shreyasingh4680 2 жыл бұрын
Thanks di!
@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
@krishapandeyviditya5595
@krishapandeyviditya5595 2 жыл бұрын
Kaisa intuition chahiye via aapko?
@anilptl
@anilptl 2 жыл бұрын
T 2:30 aren't we supposed to do that with only doubly linked list
@anujnegi8474
@anujnegi8474 2 жыл бұрын
Doubly or circular linked list nhi h playlist m
@nishant0312
@nishant0312 4 ай бұрын
We can also use collections.reverse(list) method is it correct
@dotencoma
@dotencoma Жыл бұрын
Thank You😇
@md.nahidulalamchowdhury9568
@md.nahidulalamchowdhury9568 2 жыл бұрын
Thanks a lot, mam.
@tejasveer9179
@tejasveer9179 3 жыл бұрын
CDAC VIDEO 💯💯
@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‼️
@abhishek3218
@abhishek3218 3 жыл бұрын
Pls do review of jss noida and gl bajaj
@deepeshraghuwanshi7190
@deepeshraghuwanshi7190 3 жыл бұрын
Why we didn't use collection framework here
@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 ?
@Whyycom
@Whyycom Жыл бұрын
Huge respect china❤️
@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.
@jankiparmar7014
@jankiparmar7014 3 жыл бұрын
Hlo di, how can i fulfill minimum system requirements of windows 10..
@NadeemKhan-vp5qx
@NadeemKhan-vp5qx 3 жыл бұрын
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 жыл бұрын
Yeah... Its correct
@abdurrab8947
@abdurrab8947 2 жыл бұрын
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
@aniketmishra71
@aniketmishra71 3 жыл бұрын
Thank You!
@mahadevhulsure9669
@mahadevhulsure9669 11 ай бұрын
One shot for double linked list please
@komaltiwari1903
@komaltiwari1903 7 ай бұрын
How to reverse linked list using collection framework??
@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.
@kainaatmakhani6550
@kainaatmakhani6550 2 жыл бұрын
good job
@ayshwaryakatheria9366
@ayshwaryakatheria9366 Жыл бұрын
Is there any video on LinkedHashMap
@ujjawaldewangan8345
@ujjawaldewangan8345 3 жыл бұрын
didi vedio ki frequency badhao because its is better then c++ due to pen paper
@asadullahallmamun3192
@asadullahallmamun3192 2 жыл бұрын
Need more video and explanation with debug the memory how to work it's help us please didi
@shubhiofficial1629
@shubhiofficial1629 3 жыл бұрын
Didi I took bsc maths in Hindu College . Should I learn coding and how it will help me
@hjhjkoko1955
@hjhjkoko1955 3 жыл бұрын
Aur lo bsc 😂😂😂😂😂
@shubhiofficial1629
@shubhiofficial1629 3 жыл бұрын
@@hjhjkoko1955 tere pas kya h
@MH11_optimistic
@MH11_optimistic 2 жыл бұрын
Mam please share most ask coding que for software testing
@krishapandeyviditya5595
@krishapandeyviditya5595 2 жыл бұрын
I have check out on mine chnnel..
@satyamevjayate3740
@satyamevjayate3740 3 жыл бұрын
Make a vedio for java programming in moblie
@Rpshortsvideo1997
@Rpshortsvideo1997 3 жыл бұрын
plz i want more video of java
@chemtube3852
@chemtube3852 3 жыл бұрын
Java key liya kunsa book acha hoga??
@ieltsbaba8400
@ieltsbaba8400 2 жыл бұрын
How in recursion java knows who is prev and next element? Can anyone please explain? In recursion we haven't modify the prev and next pointers then how it will know the links? please explain.
@krishapandeyviditya5595
@krishapandeyviditya5595 2 жыл бұрын
Mai insaan hi hu.. May I do ielts baba dutiuyane?
@swarna6384
@swarna6384 3 жыл бұрын
Is there any data structure course I this channel?
@rushikeshgavhane4795
@rushikeshgavhane4795 7 ай бұрын
Not understand didi.. please explain dry run of code also.. so we can understand.. what is previous Ani current on graph
@prathamgupta1632
@prathamgupta1632 2 жыл бұрын
double aand circular linklist?
@chemtube3852
@chemtube3852 3 жыл бұрын
Ek video book key upar for coding
@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
@infinite639
@infinite639 2 жыл бұрын
circular and dobuly linked list
@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
@Abaddon-u1i
@Abaddon-u1i Жыл бұрын
I understood the iterative approach but didn't understand the recursive one, I guess I'm just too dumb to understand recursion.
@Gg69696
@Gg69696 Жыл бұрын
Ma'am ne thik se samjhaya hi nhi 😢
@MajinBuu45
@MajinBuu45 2 жыл бұрын
Thank you
@explainco.1388
@explainco.1388 3 жыл бұрын
1st view..
@VaibhawSingh-hz5tm
@VaibhawSingh-hz5tm Жыл бұрын
where I get DSA course
@edu-amplifier2451
@edu-amplifier2451 3 жыл бұрын
Please make a review video on NIT Jalandhar. 🙏
@dakshchhabra9950
@dakshchhabra9950 3 жыл бұрын
no
@edu-amplifier2451
@edu-amplifier2451 3 жыл бұрын
@@dakshchhabra9950 Why no?
@P_R_lovebird
@P_R_lovebird 11 ай бұрын
Nicely 🤦didi
@kanailalmanna5005
@kanailalmanna5005 3 жыл бұрын
Didi Mai biology background se hu, only by this course is it possible to get select in GSoC , please help me to this ,
@siddharthsingh2859
@siddharthsingh2859 2 жыл бұрын
"only by this course" - NO
@siddharthsingh2859
@siddharthsingh2859 2 жыл бұрын
aur v cheezen padhna padega - Go do a google search for that
@tanushree2675
@tanushree2675 Жыл бұрын
solution of previous homework problem
@crackexamvibes8267
@crackexamvibes8267 3 жыл бұрын
Hi everyone
@hometvfirestick
@hometvfirestick 2 жыл бұрын
Thanks
@rattanjotsingh2483
@rattanjotsingh2483 3 жыл бұрын
great!
@dancingindia24
@dancingindia24 2 жыл бұрын
how to reverse circular linked list
@aniketkeshri226
@aniketkeshri226 3 жыл бұрын
when will next video launch??
@Sachin-wt9eo
@Sachin-wt9eo 3 жыл бұрын
दीदी, Software Engineer students को placement‌ के लिए अलग से पढ़ने की जरूरत क्यों होती है?? क्या college study students को placement‌ ready नहीं बनाती है??
@ashishkumar-fd4gp
@ashishkumar-fd4gp 3 жыл бұрын
nhi bhai nhi bnte
@Sachin-wt9eo
@Sachin-wt9eo 3 жыл бұрын
@@ashishkumar-fd4gp kyon bhaiya
@ashishkumar-fd4gp
@ashishkumar-fd4gp 3 жыл бұрын
@@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
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 51 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 59 МЛН
Stack Data Structure in One Video | Java Placement Course
36:45
Apna College
Рет қаралды 765 М.
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,3 МЛН
Java Collections Framework | Java Placement Course
17:53
Apna College
Рет қаралды 687 М.
L9. Reverse a LinkedList | Iterative and Recursive
32:42
take U forward
Рет қаралды 170 М.