I'm brushing up on my Algorithms and Data Structures for an interview with Google that I'm extremely nervous about. Loved the video. I especially like the pace as it was quick enough to be perfect for something I had already seen. The colors and pictures give it a nice fun feeling. I also wanted to comment that I think it's fantastic that you took the time to actually answer people's questions and comments. Unbelievable value. I look forward to using your channel more in the future and I'll be sure to recommend it to others.
The high definition video and added animations really enriched the content. I don't feel tired or stressed at all while watching your tutorial. This is the best Java Linked List video.
I'm glad there are people out there like you that are kind enough and able enough to come out and teach on TH-cam. My professor is very smart, but may very well be the worst at explaining concepts and is terrible about reading off the Powerpoint.
Java actually has Linked Lists in it. The idea here is to teach you how to make your own custom data structures. Also it teaches you about how these data structures work and teaches logic. OOD teaches design, design patterns / refactoring teach how to write flexible code and algorithm study teaches how to write efficient optimized code. It is the trinity of programming. I hope that makes sense
Before I clicked on this video, I had no clue what the hell I was doing with the code that the professor gave us. I clicked the video, watched it for a few minutes and I just had this big smile on face because I was starting to understand and learn. I wish we had professors that could teach like you at my University.
Derek Banas You should consider teaching. My professors aren't very good at giving non-technology examples that make it easier to understand. Your newest guy example is really helpful.
These videos are concise, to the point, and easy to understand. Hoping to pass the gauntlet interview with one of the big software companies in the next few weeks. Cheers for making this quick and easy.
It was quite hard to understand what you said due to the fast talking and the repetition of the word "link", but after I viewed the code, it all became clearer. Nice video!
You are amazing at explaining this. Talk about it code it repeat. Lectures are confusing because its all talk no code and labs are all code no talk. The mixture is perfect. Earned a sub from me. Thank you sir!
This is awesome. A little too fast-paced to jam straight through, which is perfect because there is always the pause button when needed and I don't have to waste my life waiting for you to get to an important point or accidentally fast-forward through something important like I do in other videos. Great demonstration of the concepts. Can't wait to watch more videos. Subscribed!
PHENOMENAL EVENING I just had with my buddy Derek, coding up some Linked List in Kotlin. I used this as a template to immerse myself into Kotlin more and practice Kotlinizing the old Java style. Well done Derek, I know this is about as basic as it gets but fun fun functional
I've been struggling to understand this at University. Your tutorials have been great and helped me to understand it a lot better. Thank you very much for putting these up. Keep up the good work.
Your video was incredible - I learnt a lot more about linked lists from this video than I did from classes, and your video also fixed the massive issue that I was having while attempting to complete a piece of coursework for my university course!
You're very welcome :) I should be able to cover Hash tables by the end of this weekend. I'll see what I can do about Big O Notation. I should be able to explain it by covering the performance of different algorithms.
You're very welcome :) Yes the Link class is representing a sort of node and the LinkList class represents every Link. The Links are just objects. That is why they have fields in them
Someone give that man a medal. Mr. Banas your tutorials are inspiring and by far one of the best ones I'v seen. Logic, explaining and examples, specialy with pictures is very educate've(if this word even exists) Sorry for mispelings you GrammaNazi's.^^
Hi Derek! u covered much more content in the 17-min video than what my prof did in his 2-hour lecture! it really helped me a lot in understanding the linked list algo! thank u :)
This was a really good video! It was so concise and fit three hours of material in like 20 minutes! The analogy of the guys moving into the neighborhood really helped too! Thank you so much for making this video!!!!!
Thanks! I had this lecture last week and it really didn't make any sense. I got an integer linked list to work using your example and code on your website. Keep up the good work!
Thanks Derek you saved my life, I wish in the future you slow down a little bit and not to compare your knowledge to everyone else because obviously you are a genius lol
Great video, thanks Derek. I'm taking a Java-based Data Structures class right now and this is very supplemental to my learning. Like the guy 2 weeks ago also suggested, a Big O Notation video would be awesome! Looking forward to watching the rest of your videos.
So in short: Lets use the analogy of working in a restaurant. We ask the most recent hired guy (John), "who was in charge before you?", he says "Steve was in charge before me". We then find Steve and ask him "who worked at the restaurant before you?" He says "Jim". We then go to Jim and ask him "who worked at the restaurant before you?" He says "David". We then ask David "who worked here before you?". He says "No one because I was the first to work in this restaurant". In code, David would return the value "null" because no one working there existed before him. For all the other guys, we return "next" to reference the next guy working in that restaurant.
wish i'd found these videos sooner as a lot of the concepts you've covered were fairly troublesome at the beginning of the year for me but exams are coming and you've been a lifesaver! :D
Jose Ulloa Haha, we are in the same class. I love Derek Banas 's videos, I've seen the Web Development ones back in my Freshman Year of High School. One of the contributions to why I started programming in life. Well made videos!
Sorry I looked, but even with the HTML5 video option on ( youtube. com/html5 ) my videos can't be played at different speeds. I'd change it for you, but I'm not sure how to? I'll see if I can figure it out
Thanks, this video helped a lot. Despite your explanation, it still took me a whole 4 days of consistency and persistence to get a better understanding of how the linked list is structured and why you wrote the methods the way you did (this was actually testing them myself like you did in the end of the video). After the 4 days of studying your video, this video definitely helped me finishing my data structure project in one or two hours. So that's pretty neat. I seen other linked list video but this one takes the cake with the whole diagram, code examples, and a lot of explanation in between. I wish you replaced my CS professor in college.
I am sorry but i have watched a lot of your videos and so far i have had a really hard time following your logic... Like your address metaphor seems backwards to me in that it seems each "person" would not know the address but instead something like the phone number and it would be for the next guy who moves in not the last.
i think it was a great video, pretty straightforward and clear, it goes very fast but that's not a problem cuz i can rewind the video, anyway, great job, please keep making these great videos, it really helped me a LOT because i was very confused with using linked lists with java but following your code makes it a lot simpler and easy to follow. Thank you...
The class LinkList basically just stores the first Link created, but since each Link created stores a Link to the next Link enough information is available to search through all of them. Does that help?
I'm gonna second this...i nearly went insane trying to understand it, i just have to block it out and look up other tutorials on the web for the concept of linked list. What i think i know so far is that each "link" aka "node" points to the next "node" in the list and so on till you reach the end. Each "node" has data (instance variables) and a pointer to the next, and the first "node" in the linked list is referred to the "head".
Same here I feel like if he at least said the opposite as in the head is the first person in a neighbourhood, and he knows the second person to move in, the second person knows the third person etc. The fact that the original would somehow connect to the newest person to move in each time had me confused the whole time tbh
14:54 you have if(currentLink == firstLink) { but if you already set currentLink equal to firstLink before when you have Link currentLink == firstLink doesn't the code in the if statement always run since currentLink will be equal to firstLink?
Great Tutorial ! Good practice :) I was looking for this kind of video on youtube but could not find any. Thank you Derek Banas. Do not forget the get and set methods in the future :D
Sorry about that. I answered to quickly. You just need to cycle through the list and store both the current node and the node previous to the current node. When NULL is reached and there are no more links give next for the previous node the value of NULL
@15:18 I don't understand that: [1] if currentLink == firstLink why would we set firtsLink = firstLink.next (thereby removing the firstLink even though it is may not be the link that we are trying to remove. [2] Why set the previousLink.next == currentLink.next? Can someone please explain these lines with a conceptual example?
I use linked lists all of the time, but I use the one built into java. These tutorials are all about understanding the Logic in programming so that you can create your own custom data structures and algorithms. You won't need to create your own linked list though.
Thank you so much for this video! Amazing tutorial, I understood "what" the linked list was, but not how to necessarily "use" it to my advantage. This definitely cleared it up. Awesome job sir!
Bonjour Cher Coach, Cette série va être un changeur de jeu pour mes préparatifs entrevue. Heureux d'être sur le podium avec une médaille d'argent. Affichage à 8 h, HNE m'a fait la deuxième place. Sera préparé pour la prochaine 8 post h. Merci beaucoup.
Thanks a lot for this video! We have started learning about linked lists in my class recently and this really helped me improve my understanding of the concept, and since it is using Java that is a great plus as my coursework will have to be coded in Java ;)
I am definitely going to get back into advanced algorithms. I'm doing Android tutorials for the rest of the year with topics like algorithms mixed it :)
The analogy does not make sense to me. If LinkedList is suppose to have the address of the very last guy that moved in, why does he have address for the second guy?
+Paul Trimor If you mean the address he has for the second guy is for the guy after LinkedList, you're thinking that LinkedList is the first guy. Really, he isn't- after all, he has no value and is only in the list so he can announce the address of the last guy, who is really the "first" guy.
next is a Link object that is saved in the Link class through composition. I know it is weird to have an object of the same class in that class, but that is just the way it is. toString() is also in that class
Brilliant video ! Just one question, at 15:14 you are doing previousLink.next = currentLink.next. However currentlink's memory location still points to the next memory location. Shouldn't you do currentlink.next= NULL, after the statement ? Eg; A-> B -> C->-D->E I want to delete C . B's Next is made to be C's next, ie D. But now both B and C's next point to D. The list is somewhat like this A->B->D->E Parallely C->D . So shouldn't you do C's next = NULL . So that, the garbage collector removes it ? Awaiting your reply .Thanks
thank you so much for you explanation on this subject! It definetly helped alot especially how next is a reference to the previous link. It's actually working backwards. Big up
11:28 I thought we could not directly compare strings to one another since they are themselves objects? I thought I had to use a line like: while(!theLink.equals(bookName)) Although, I did test the direct comparison and it worked ok, is this something that used to be an issue? Or does it depend on the version of JAVA you're using?
Thank you for doing what my professor could not.
+DaL33T5 You're very welcome :)
Was about to comment the same exact thing until I saw this one haha
same, my professor doesn't even know the difference between linked list and queue lol
Derek - thank you . You're no-nonsense approach and flawless narration is perfect. It's been five years - I hope you're still teaching.
Thank you for the nice compliment :) Yes many more tutorials are coming
I'm a CS student, and I find your Java videos SO helpful. Please keep doing what you're doing. Great work!
Thank you :) I'm happy you like them
I'm brushing up on my Algorithms and Data Structures for an interview with Google that I'm extremely nervous about. Loved the video. I especially like the pace as it was quick enough to be perfect for something I had already seen. The colors and pictures give it a nice fun feeling. I also wanted to comment that I think it's fantastic that you took the time to actually answer people's questions and comments. Unbelievable value. I look forward to using your channel more in the future and I'll be sure to recommend it to others.
Adam Smith Thank you for all the wonderful compliments :) Best of luck on your interview!
How it went???
How did it go?
speed of the video might turn off some people, but for me who's brushing up for interviews this is perfect. Thanks so much!
ironphoenix04 I try to make a different type of tutorial. I'm glad you like them :)
The high definition video and added animations really enriched the content. I don't feel tired or stressed at all while watching your tutorial. This is the best Java Linked List video.
Gran Cero thank you :) I'm constantly trying to improve. I'm glad you liked it.
I'm glad there are people out there like you that are kind enough and able enough to come out and teach on TH-cam. My professor is very smart, but may very well be the worst at explaining concepts and is terrible about reading off the Powerpoint.
I'm very happy that I can help :)
Java actually has Linked Lists in it. The idea here is to teach you how to make your own custom data structures. Also it teaches you about how these data structures work and teaches logic. OOD teaches design, design patterns / refactoring teach how to write flexible code and algorithm study teaches how to write efficient optimized code. It is the trinity of programming. I hope that makes sense
I love the way you present your content. Upbeat, quick but not too fast, compact and aesthetically pleasing. I've subscribed.
Thank you :) I'm glad you are finding the videos useful.
So helpful. I am such a visual learner and being able to see an example and apply it to my own situation is exactly what I need.
+Rita Lanoie Thank you :) I'm glad it helped
You nailed it dude . I loved your fast-paced tutorials and not much repetitive. Have exam tomorrow , pretty confident ;).
Cerealkiller Thank you :) Best of luck on the exam.
Dude it's three years later. How did the exam go?
I owe you the 93 I earned on my exam! Thank you so much Derek! Please don't stop making videos like these..
Sachin Moozhikulam That's awesome :) I'm glad I could help!
Thank you very much :) I love making these videos and it is great that people are enjoying them
Your tutorials are what all youtube tutorials should aspire to.
+Chuck Dries Thank you for the nice compliment :)
Before I clicked on this video, I had no clue what the hell I was doing with the code that the professor gave us. I clicked the video, watched it for a few minutes and I just had this big smile on face because I was starting to understand and learn. I wish we had professors that could teach like you at my University.
chataolauj Thank you for writing such a nice message. I appreciate it :) I'm happy I could help.
Derek Banas
You should consider teaching. My professors aren't very good at giving non-technology examples that make it easier to understand. Your newest guy example is really helpful.
These videos are concise, to the point, and easy to understand. Hoping to pass the gauntlet interview with one of the big software companies in the next few weeks. Cheers for making this quick and easy.
Thank you for the compliment :) Best of luck on your interview!
This video is BEYOND helpful. Linked lists were really giving me trouble when it came to how they are added. Thanks for helping clear things up!
+GarraOfTheFunk14 Your welcome :) I'm happy it helped.
It was quite hard to understand what you said due to the fast talking and the repetition of the word "link", but after I viewed the code, it all became clearer. Nice video!
Sorry about the speed of the video. I'm glad it helped :)
Did you know that you can change the speed of the youtube video at the setting near the full screen button. (In case you didn't know) :)
I think this is one of those topics that could have been slowed down a bit, but apart from that, thank you! This really did help.
You are amazing at explaining this. Talk about it code it repeat. Lectures are confusing because its all talk no code and labs are all code no talk. The mixture is perfect. Earned a sub from me. Thank you sir!
Thank you :) I'm happy I could help
I just want to say that you are a god. Managining TH-cam and computer science would be very difficult without you.
Ryan Kwon Thank you :) I'm very happy that I can help
I had to watch this at .75 speed for my brain to keep up with you! Thank you so much- very VERRRRRRRY helpful. I have a good grasp on it now.
I'm very happy it helped :) Sorry about the speed
This is awesome. A little too fast-paced to jam straight through, which is perfect because there is always the pause button when needed and I don't have to waste my life waiting for you to get to an important point or accidentally fast-forward through something important like I do in other videos.
Great demonstration of the concepts. Can't wait to watch more videos. Subscribed!
Ben Brock Thank you for all the nice compliments :)
PHENOMENAL EVENING I just had with my buddy Derek, coding up some Linked List in Kotlin. I used this as a template to immerse myself into Kotlin more and practice Kotlinizing the old Java style.
Well done Derek, I know this is about as basic as it gets but fun fun functional
Thank you for the nice message 😁 I'm happy you enjoyed the video
I've been struggling to understand this at University. Your tutorials have been great and helped me to understand it a lot better. Thank you very much for putting these up. Keep up the good work.
Your video was incredible - I learnt a lot more about linked lists from this video than I did from classes, and your video also fixed the massive issue that I was having while attempting to complete a piece of coursework for my university course!
Thank you :) I'm happy I could help
thank you for this, my teacher told us what linked lists are and just left us to find out everything else for ourselves. this helps immensely
Thank you :) I'm glad it helped
You're very welcome :) I should be able to cover Hash tables by the end of this weekend. I'll see what I can do about Big O Notation. I should be able to explain it by covering the performance of different algorithms.
Honestly, I learned more on your channel than I do in college during class lol
I'm very happy that I'm able to help :) Thank you
You're very welcome :) Yes the Link class is representing a sort of node and the LinkList class represents every Link. The Links are just objects. That is why they have fields in them
It's a bit hard to follow because the word "link" is used so much but i think i got it down.
yea... shoulda used other names like Node or Guy. too many Links lol.
Node is preferable
yes ,i agreee, it's a bit confusing!
My thoughts exactly. That and it seemed like he was talking extremely fast
I'm very happy that i was able to help :) You're very welcome
Someone give that man a medal. Mr. Banas your tutorials are inspiring and by far one of the best ones I'v seen. Logic, explaining and examples, specialy with pictures is very educate've(if this word even exists)
Sorry for mispelings you GrammaNazi's.^^
Thank you very much :) I'm happy you liked them
Hi Derek! u covered much more content in the 17-min video than what my prof did in his 2-hour lecture! it really helped me a lot in understanding the linked list algo! thank u :)
Wang Ke Coco Thank you very much :) I'm happy I could help.
This was a really good video! It was so concise and fit three hours of material in like 20 minutes! The analogy of the guys moving into the neighborhood really helped too! Thank you so much for making this video!!!!!
Thanks! I had this lecture last week and it really didn't make any sense. I got an integer linked list to work using your example and code on your website.
Keep up the good work!
Thanks for posting this Derek. You have a lively voice and your speed is just apt to keep us interested.
You're very welcome :) Thank you for the very kind message.
Thank you, this helped me so much! This is one of the best tutorials I've ever seen. So straightforward and easy to understand
Kevin Young Thank you for the nice compliment :) I'm glad you liked it
Your illustrations made this so easy to understand, thank you so much.
+broxhouse Thank you :) You're very welcome
You're very welcome :) Always feel free to ask questions or give input. I don't get offended by input. I welcome it. it is what makes me better.
Thanks Derek you saved my life, I wish in the future you slow down a little bit and not to compare your knowledge to everyone else because obviously you are a genius lol
I'm happy I could help :) I promise you that I'm not a genius
You save a lot of our time by making those edits. Thanks for that. This also helps in not losing my focus
Derek thanks for all your help, Your tutorials are the best, rest youtube Java tutorials are only waste of time
Thank you for the compliment :) I do my best
Great video, thanks Derek. I'm taking a Java-based Data Structures class right now and this is very supplemental to my learning.
Like the guy 2 weeks ago also suggested, a Big O Notation video would be awesome!
Looking forward to watching the rest of your videos.
So in short: Lets use the analogy of working in a restaurant. We ask the most recent hired guy (John), "who was in charge before you?", he says "Steve was in charge before me". We then find Steve and ask him "who worked at the restaurant before you?" He says "Jim". We then go to Jim and ask him "who worked at the restaurant before you?" He says "David". We then ask David "who worked here before you?". He says "No one because I was the first to work in this restaurant". In code, David would return the value "null" because no one working there existed before him. For all the other guys, we return "next" to reference the next guy working in that restaurant.
Cool! What a great analogy. I admit that I got a bit confused with the analogy of guys moving to town.
It might have something to do with the fact that I record in 1080p? Sorry, but at this time I can't do anything to speed the video up
wish i'd found these videos sooner as a lot of the concepts you've covered were fairly troublesome at the beginning of the year for me but exams are coming and you've been a lifesaver! :D
Thanks for the video! Makes learning the concept much simpler than my professor!
I'm very happy that I could help :)
Jose Ulloa Haha, we are in the same class. I love Derek Banas 's videos, I've seen the Web Development ones back in my Freshman Year of High School. One of the contributions to why I started programming in life. Well made videos!
Alastair Paragas Wow, thank you very much :) It is always very nice to hear that I have helped.
Thank you Derek Banas for helping me a lot to understant LinkedList!!!
Watching your tutorial is👍 now I know what is LinkedList.👍✔✔✔
I’m very happy that I could help :)
The key for me to understand it was that the Link is a self-reference class. I realized that while you were going throughout the code. Thanks
Thank you :) I'm very happy to have been able to help.
Sorry I looked, but even with the HTML5 video option on ( youtube. com/html5 ) my videos can't be played at different speeds. I'd change it for you, but I'm not sure how to? I'll see if I can figure it out
Thanks, this video helped a lot. Despite your explanation, it still took me a whole 4 days of consistency and persistence to get a better understanding of how the linked list is structured and why you wrote the methods the way you did (this was actually testing them myself like you did in the end of the video). After the 4 days of studying your video, this video definitely helped me finishing my data structure project in one or two hours. So that's pretty neat. I seen other linked list video but this one takes the cake with the whole diagram, code examples, and a lot of explanation in between. I wish you replaced my CS professor in college.
Nicholas Kong Thank you for the nice compliment :) You studied the video perfectly.
Thank you :) I'm glad to help. Good luck on your interview.
Thanks so much for ALL you tutorials!! I have been very lost in my data structures class.
Tommie Lackey You're very welcome :) I'm happy that I could help
I am sorry but i have watched a lot of your videos and so far i have had a really hard time following your logic... Like your address metaphor seems backwards to me in that it seems each "person" would not know the address but instead something like the phone number and it would be for the next guy who moves in not the last.
i think it was a great video, pretty straightforward and clear, it goes very fast but that's not a problem cuz i can rewind the video, anyway, great job, please keep making these great videos, it really helped me a LOT because i was very confused with using linked lists with java but following your code makes it a lot simpler and easy to follow. Thank you...
Man, Derek. You must do really well in technical interviews.
+xn0mad I'm an older guy, so it is always funny when I'm interviewed by someone that is 15 years younger then myself :)
The class LinkList basically just stores the first Link created, but since each Link created stores a Link to the next Link enough information is available to search through all of them. Does that help?
I love how you make it so easy using diagrams. I am more of a visual person when it comes to understanding something. Thank you :D
l4p4k Thank you :) I'm glad you found it useful.
Really thanks,Derek Banas for this video. I able to score full marks in test data structure.
Your video has been extremely informative. I now have a really good understanding of how the LinkedList functions. Thanks Derek (Y)
Wow man, great video! I love your break down of each process with graphical representation. Subscribed!
+Keenan Hall Thank you very much :)
Thanks for this video! Have been struggling with single linked lists for my exams!
+HavitheAddicted Your welcome :) I'm glad it helped
the "newset guy that moved into town" example was too wordy and confusing, should have picked a better example
I'm gonna second this...i nearly went insane trying to understand it, i just have to block it out and look up other tutorials on the web for the concept of linked list. What i think i know so far is that each "link" aka "node" points to the next "node" in the list and so on till you reach the end. Each "node" has data (instance variables) and a pointer to the next, and the first "node" in the linked list is referred to the "head".
i totally agree.
Same here I feel like if he at least said the opposite as in the head is the first person in a neighbourhood, and he knows the second person to move in, the second person knows the third person etc. The fact that the original would somehow connect to the newest person to move in each time had me confused the whole time tbh
hm, I liked that analogy actually and had no problem understanding the concepts. I guess it differs from person to person...
bouncinggyro I thought this analogy was spot on.
This video was amazing - thank you so much! Your delivery made it so easy to watch.
+Ciara Christopherson Thank you :) I'm happy that you liked it.
+Ciara Christopherson Tell me about it..
14:54 you have if(currentLink == firstLink) {
but if you already set currentLink equal to firstLink before when you have
Link currentLink == firstLink
doesn't the code in the if statement always run since currentLink will be equal to firstLink?
Great Tutorial ! Good practice :) I was looking for this kind of video on youtube but could not find any. Thank you Derek Banas. Do not forget the get and set methods in the future :D
Thank you :) I'm very happy that I could help.
Sorry about that. I answered to quickly. You just need to cycle through the list and store both the current node and the node previous to the current node. When NULL is reached and there are no more links give next for the previous node the value of NULL
Clear explanation of concepts with good examples, appreciate it :)
Thank you very much :)
@15:18 I don't understand that:
[1] if currentLink == firstLink why would we set firtsLink = firstLink.next (thereby removing the firstLink even though it is may not be the link that we are trying to remove.
[2] Why set the previousLink.next == currentLink.next?
Can someone please explain these lines with a conceptual example?
I pay thousands at university to end up watching Derek anyway. Thanks again.
I'm happy to be of service :)
Andy Bernard from The Office is teaching me Java.
Can't unhear
thank you derek banas for these wonderful tutorials
Thank you :)
I use linked lists all of the time, but I use the one built into java. These tutorials are all about understanding the Logic in programming so that you can create your own custom data structures and algorithms. You won't need to create your own linked list though.
why you building "to the left" though? can't you just keep first? and point it's next to the new added node, or link or whatever?
System.out.println("Thank You");
Thanks, the illustration was helpful and made understanding of linkedList easier.
+Aisha Abdinur Great I'm glad it helped :)
Thank you so much for this video! Amazing tutorial, I understood "what" the linked list was, but not how to necessarily "use" it to my advantage. This definitely cleared it up. Awesome job sir!
Great I'm very happy I was able to help :)
Bonjour Cher Coach,
Cette série va être un changeur de jeu pour mes préparatifs entrevue.
Heureux d'être sur le podium avec une médaille d'argent.
Affichage à 8 h, HNE m'a fait la deuxième place.
Sera préparé pour la prochaine 8 post h.
Merci beaucoup.
Are you a teacher, because If you're not you should. you explain this the best way I ever heard it being explained.
Thank you for the compliment :) No I don't work for a university, but on occasion I help university students with their projects
Wow, this is very helpful. You are a very good teacher!
Your welcome :) I'm glad you guys are liking these
You are a wonderful teacher .........
Thank you for this kind of nice videos............
Thank you for the compliment :) I'm happy you like them
Thanks a lot for this video! We have started learning about linked lists in my class recently and this really helped me improve my understanding of the concept, and since it is using Java that is a great plus as my coursework will have to be coded in Java ;)
I am definitely going to get back into advanced algorithms. I'm doing Android tutorials for the rest of the year with topics like algorithms mixed it :)
Thank you :) I do my best to help
Btw, dont classes have to be created as a separate folder in source package? I work in netBeans and this gives me a bit of trouble
In your diagrams you make LinedList seem like a List object. It took me a while to finally understand lol
Was confused until the end once he actually made the list it made more sense.
@Lubji Hoch Same, Derek I could not thank you more. You explained this better in 20 minutes than my lecturer could do in 2 hours.
Thank you for the nice compliment :)
thankyou for explaining the way literally no one could
Thank you very much :) I'm happy you enjoyed it
The analogy does not make sense to me. If LinkedList is suppose to have the address of the very last guy that moved in, why does he have address for the second guy?
+Paul Trimor If you mean the address he has for the second guy is for the guy after LinkedList, you're thinking that LinkedList is the first guy. Really, he isn't- after all, he has no value and is only in the list so he can announce the address of the last guy, who is really the "first" guy.
next is a Link object that is saved in the Link class through composition. I know it is weird to have an object of the same class in that class, but that is just the way it is. toString() is also in that class
I like the way you give explanation step by step, thanks
I'm happy the video was useful :)
Brilliant video ! Just one question, at 15:14 you are doing previousLink.next = currentLink.next. However currentlink's memory location still points to the next memory location. Shouldn't you do currentlink.next= NULL, after the statement ? Eg;
A-> B -> C->-D->E
I want to delete C . B's Next is made to be C's next, ie D. But now both B and C's next point to D. The list is somewhat like this
A->B->D->E Parallely C->D . So shouldn't you do C's next = NULL . So that, the garbage collector removes it ?
Awaiting your reply .Thanks
thank you so much for you explanation on this subject! It definetly helped alot especially how next is a reference to the previous link. It's actually working backwards. Big up
and how the very first link or (first guy who moved in town) always refers to null
Great tutorial, the moving in example was very clearing up! Thanks.
11:28 I thought we could not directly compare strings to one another since they are themselves objects? I thought I had to use a line like: while(!theLink.equals(bookName)) Although, I did test the direct comparison and it worked ok, is this something that used to be an issue? Or does it depend on the version of JAVA you're using?
So yeah, equals() is the correct way to compare strings, it just happens that == works sometimes.
== compares memory addresses.
which doesn't always return true when comparing strings, so it's not a good idea to use it this way.