Linked List in Java

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ม.ค. 2025

ความคิดเห็น • 830

  • @DaL33T5
    @DaL33T5 9 ปีที่แล้ว +299

    Thank you for doing what my professor could not.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว +38

      +DaL33T5 You're very welcome :)

    • @DonJewey
      @DonJewey 7 ปีที่แล้ว +1

      Was about to comment the same exact thing until I saw this one haha

    • @appo2556
      @appo2556 6 ปีที่แล้ว +2

      same, my professor doesn't even know the difference between linked list and queue lol

  • @NigelDeans
    @NigelDeans 6 ปีที่แล้ว

    Derek - thank you . You're no-nonsense approach and flawless narration is perfect. It's been five years - I hope you're still teaching.

    • @derekbanas
      @derekbanas  6 ปีที่แล้ว

      Thank you for the nice compliment :) Yes many more tutorials are coming

  • @willdonabedian3453
    @willdonabedian3453 7 ปีที่แล้ว +3

    I'm a CS student, and I find your Java videos SO helpful. Please keep doing what you're doing. Great work!

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว +1

      Thank you :) I'm happy you like them

  • @adam6806
    @adam6806 9 ปีที่แล้ว +8

    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.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว +3

      Adam Smith Thank you for all the wonderful compliments :) Best of luck on your interview!

    • @Clartred
      @Clartred 7 ปีที่แล้ว +6

      How it went???

    • @valentine5062
      @valentine5062 5 ปีที่แล้ว

      How did it go?

  • @thesoloduet
    @thesoloduet 10 ปีที่แล้ว +14

    speed of the video might turn off some people, but for me who's brushing up for interviews this is perfect. Thanks so much!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว +3

      ironphoenix04 I try to make a different type of tutorial. I'm glad you like them :)

  • @granceroblast
    @granceroblast 10 ปีที่แล้ว +3

    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.

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว +2

      Gran Cero thank you :) I'm constantly trying to improve. I'm glad you liked it.

  • @ThatXboxAddict
    @ThatXboxAddict 8 ปีที่แล้ว +1

    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.

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      I'm very happy that I can help :)

  • @derekbanas
    @derekbanas  12 ปีที่แล้ว +2

    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

  • @andyabq8859
    @andyabq8859 10 ปีที่แล้ว +1

    I love the way you present your content. Upbeat, quick but not too fast, compact and aesthetically pleasing. I've subscribed.

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว +1

      Thank you :) I'm glad you are finding the videos useful.

  • @rlanoie1
    @rlanoie1 9 ปีที่แล้ว +7

    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.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว +3

      +Rita Lanoie Thank you :) I'm glad it helped

  • @GjerdanPeterson
    @GjerdanPeterson 10 ปีที่แล้ว +12

    You nailed it dude . I loved your fast-paced tutorials and not much repetitive. Have exam tomorrow , pretty confident ;).

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว +2

      Cerealkiller Thank you :) Best of luck on the exam.

    • @Bladebreak3r
      @Bladebreak3r 7 ปีที่แล้ว

      Dude it's three years later. How did the exam go?

  • @SachinMooZZ
    @SachinMooZZ 10 ปีที่แล้ว +2

    I owe you the 93 I earned on my exam! Thank you so much Derek! Please don't stop making videos like these..

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว +2

      Sachin Moozhikulam That's awesome :) I'm glad I could help!

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you very much :) I love making these videos and it is great that people are enjoying them

  • @chuckdries
    @chuckdries 8 ปีที่แล้ว

    Your tutorials are what all youtube tutorials should aspire to.

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      +Chuck Dries Thank you for the nice compliment :)

  • @chataolauj
    @chataolauj 10 ปีที่แล้ว +26

    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.

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว +5

      chataolauj Thank you for writing such a nice message. I appreciate it :) I'm happy I could help.

    • @chataolauj
      @chataolauj 10 ปีที่แล้ว +1

      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.

  • @jaysuvius
    @jaysuvius 8 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว +1

      Thank you for the compliment :) Best of luck on your interview!

  • @GarraOfTheFunk14
    @GarraOfTheFunk14 9 ปีที่แล้ว

    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!

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      +GarraOfTheFunk14 Your welcome :) I'm happy it helped.

  • @nadi106100
    @nadi106100 10 ปีที่แล้ว +3

    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!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Sorry about the speed of the video. I'm glad it helped :)

    • @tasssan1322
      @tasssan1322 10 ปีที่แล้ว +2

      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) :)

  • @TheWindsofWonder
    @TheWindsofWonder 8 ปีที่แล้ว +1

    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.

  • @SGTSTEWRAT
    @SGTSTEWRAT 6 ปีที่แล้ว

    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!

    • @derekbanas
      @derekbanas  6 ปีที่แล้ว

      Thank you :) I'm happy I could help

  • @RyanKwon
    @RyanKwon 10 ปีที่แล้ว

    I just want to say that you are a god. Managining TH-cam and computer science would be very difficult without you.

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Ryan Kwon Thank you :) I'm very happy that I can help

  • @joshschwarting8547
    @joshschwarting8547 7 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      I'm very happy it helped :) Sorry about the speed

  • @bbrock171
    @bbrock171 10 ปีที่แล้ว

    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!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Ben Brock Thank you for all the nice compliments :)

  • @matt-g-recovers
    @matt-g-recovers 4 ปีที่แล้ว

    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

    • @derekbanas
      @derekbanas  4 ปีที่แล้ว

      Thank you for the nice message 😁 I'm happy you enjoyed the video

  • @CaptainPrice01
    @CaptainPrice01 11 ปีที่แล้ว

    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.

  • @archmagedragon
    @archmagedragon 4 ปีที่แล้ว

    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!

    • @derekbanas
      @derekbanas  4 ปีที่แล้ว

      Thank you :) I'm happy I could help

  • @meep6188
    @meep6188 8 ปีที่แล้ว

    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

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      Thank you :) I'm glad it helped

  • @derekbanas
    @derekbanas  12 ปีที่แล้ว

    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.

  • @fatherromar
    @fatherromar 11 ปีที่แล้ว +9

    Honestly, I learned more on your channel than I do in college during class lol

    • @derekbanas
      @derekbanas  11 ปีที่แล้ว +1

      I'm very happy that I'm able to help :) Thank you

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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

  • @SmashBrosBrawl
    @SmashBrosBrawl 8 ปีที่แล้ว +86

    It's a bit hard to follow because the word "link" is used so much but i think i got it down.

    • @travisl6654
      @travisl6654 8 ปีที่แล้ว +11

      yea... shoulda used other names like Node or Guy. too many Links lol.

    • @Orrinton
      @Orrinton 7 ปีที่แล้ว +7

      Node is preferable

    • @sivanesansomanathapuramdas8086
      @sivanesansomanathapuramdas8086 7 ปีที่แล้ว +1

      yes ,i agreee, it's a bit confusing!

    • @robbyterry1923
      @robbyterry1923 4 ปีที่แล้ว

      My thoughts exactly. That and it seemed like he was talking extremely fast

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    I'm very happy that i was able to help :) You're very welcome

  • @nugzari939
    @nugzari939 6 ปีที่แล้ว

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

    • @derekbanas
      @derekbanas  6 ปีที่แล้ว

      Thank you very much :) I'm happy you liked them

  • @wangkecoco4085
    @wangkecoco4085 9 ปีที่แล้ว

    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 :)

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      Wang Ke Coco Thank you very much :) I'm happy I could help.

  • @snigdha148
    @snigdha148 11 ปีที่แล้ว

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

  • @200cigs
    @200cigs 6 ปีที่แล้ว

    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!

  • @baluakshay
    @baluakshay 11 ปีที่แล้ว

    Thanks for posting this Derek. You have a lively voice and your speed is just apt to keep us interested.

    • @derekbanas
      @derekbanas  11 ปีที่แล้ว

      You're very welcome :) Thank you for the very kind message.

  • @sonor922
    @sonor922 10 ปีที่แล้ว +3

    Thank you, this helped me so much! This is one of the best tutorials I've ever seen. So straightforward and easy to understand

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Kevin Young Thank you for the nice compliment :) I'm glad you liked it

  • @broxhouse
    @broxhouse 9 ปีที่แล้ว

    Your illustrations made this so easy to understand, thank you so much.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      +broxhouse Thank you :) You're very welcome

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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.

  • @Abadi881
    @Abadi881 7 ปีที่แล้ว

    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

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      I'm happy I could help :) I promise you that I'm not a genius

  • @vinaykr1991
    @vinaykr1991 7 ปีที่แล้ว

    You save a lot of our time by making those edits. Thanks for that. This also helps in not losing my focus

  • @mdar6656
    @mdar6656 7 ปีที่แล้ว

    Derek thanks for all your help, Your tutorials are the best, rest youtube Java tutorials are only waste of time

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you for the compliment :) I do my best

  • @robthehouse
    @robthehouse 11 ปีที่แล้ว +1

    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.

  • @xavierreigneau6273
    @xavierreigneau6273 4 ปีที่แล้ว +3

    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.

    • @siomarapantarotto
      @siomarapantarotto 2 ปีที่แล้ว

      Cool! What a great analogy. I admit that I got a bit confused with the analogy of guys moving to town.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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

  • @chanstarox
    @chanstarox 10 ปีที่แล้ว

    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

  • @Jose243
    @Jose243 10 ปีที่แล้ว +1

    Thanks for the video! Makes learning the concept much simpler than my professor!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      I'm very happy that I could help :)

    • @AlastairParagas
      @AlastairParagas 10 ปีที่แล้ว

      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!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Alastair Paragas Wow, thank you very much :) It is always very nice to hear that I have helped.

  • @dayajumaadil947
    @dayajumaadil947 6 ปีที่แล้ว

    Thank you Derek Banas for helping me a lot to understant LinkedList!!!
    Watching your tutorial is👍 now I know what is LinkedList.👍✔✔✔

    • @derekbanas
      @derekbanas  6 ปีที่แล้ว

      I’m very happy that I could help :)

  • @saqehi
    @saqehi 10 ปีที่แล้ว

    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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I'm very happy to have been able to help.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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

  • @nicholaskong1673
    @nicholaskong1673 9 ปีที่แล้ว

    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.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      Nicholas Kong Thank you for the nice compliment :) You studied the video perfectly.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I'm glad to help. Good luck on your interview.

  • @tom13mie
    @tom13mie 10 ปีที่แล้ว +2

    Thanks so much for ALL you tutorials!! I have been very lost in my data structures class.

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Tommie Lackey You're very welcome :) I'm happy that I could help

  • @tman7022
    @tman7022 9 ปีที่แล้ว +73

    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.

  • @andrewlopez1233
    @andrewlopez1233 5 ปีที่แล้ว

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

  • @xn0mad
    @xn0mad 9 ปีที่แล้ว

    Man, Derek. You must do really well in technical interviews.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      +xn0mad I'm an older guy, so it is always funny when I'm interviewed by someone that is 15 years younger then myself :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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?

  • @l4p4k1
    @l4p4k1 10 ปีที่แล้ว

    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

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      l4p4k Thank you :) I'm glad you found it useful.

  • @Kushagra105
    @Kushagra105 9 ปีที่แล้ว +1

    Really thanks,Derek Banas for this video. I able to score full marks in test data structure.

  • @JedaiahTan
    @JedaiahTan 11 ปีที่แล้ว

    Your video has been extremely informative. I now have a really good understanding of how the LinkedList functions. Thanks Derek (Y)

  • @kipskiplay
    @kipskiplay 9 ปีที่แล้ว

    Wow man, great video! I love your break down of each process with graphical representation. Subscribed!

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      +Keenan Hall Thank you very much :)

  • @HavitheAddicted
    @HavitheAddicted 9 ปีที่แล้ว

    Thanks for this video! Have been struggling with single linked lists for my exams!

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      +HavitheAddicted Your welcome :) I'm glad it helped

  • @bouncinggyro
    @bouncinggyro 9 ปีที่แล้ว +216

    the "newset guy that moved into town" example was too wordy and confusing, should have picked a better example

    • @GbZaid
      @GbZaid 7 ปีที่แล้ว +20

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

    • @NimbuCB
      @NimbuCB 7 ปีที่แล้ว +4

      i totally agree.

    • @KBrown2480
      @KBrown2480 5 ปีที่แล้ว +4

      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

    • @Arielebersberger
      @Arielebersberger 5 ปีที่แล้ว +6

      hm, I liked that analogy actually and had no problem understanding the concepts. I guess it differs from person to person...

    • @firebird208
      @firebird208 5 ปีที่แล้ว +3

      bouncinggyro I thought this analogy was spot on.

  • @ciarac6797
    @ciarac6797 9 ปีที่แล้ว +1

    This video was amazing - thank you so much! Your delivery made it so easy to watch.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว +2

      +Ciara Christopherson Thank you :) I'm happy that you liked it.

    • @MenOfPurposeHQ
      @MenOfPurposeHQ 9 ปีที่แล้ว

      +Ciara Christopherson Tell me about it..

  • @2990sdoifjowe
    @2990sdoifjowe 8 ปีที่แล้ว

    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?

  • @Blooderstokizz
    @Blooderstokizz 4 ปีที่แล้ว

    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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I'm very happy that I could help.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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

  • @AleenaAnnaJames9
    @AleenaAnnaJames9 8 ปีที่แล้ว

    Clear explanation of concepts with good examples, appreciate it :)

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      Thank you very much :)

  • @Daniel-lp6kf
    @Daniel-lp6kf 8 ปีที่แล้ว

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

  • @pja1991
    @pja1991 4 ปีที่แล้ว +1

    I pay thousands at university to end up watching Derek anyway. Thanks again.

    • @derekbanas
      @derekbanas  4 ปีที่แล้ว

      I'm happy to be of service :)

  • @jackstorm777
    @jackstorm777 11 ปีที่แล้ว

    Andy Bernard from The Office is teaching me Java.
    Can't unhear

  • @nirajgaonkar7669
    @nirajgaonkar7669 8 ปีที่แล้ว +4

    thank you derek banas for these wonderful tutorials

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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.

  • @RaitonGG
    @RaitonGG 7 ปีที่แล้ว

    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?

  • @derekbanas
    @derekbanas  12 ปีที่แล้ว +15

    System.out.println("Thank You");

  • @aishaabdinur3635
    @aishaabdinur3635 8 ปีที่แล้ว

    Thanks, the illustration was helpful and made understanding of linkedList easier.

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      +Aisha Abdinur Great I'm glad it helped :)

  • @LifeOrbPlusle
    @LifeOrbPlusle 10 ปีที่แล้ว

    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!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Great I'm very happy I was able to help :)

  • @123japanuser
    @123japanuser 12 ปีที่แล้ว

    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.

  • @shayanirenberg3294
    @shayanirenberg3294 8 ปีที่แล้ว

    Are you a teacher, because If you're not you should. you explain this the best way I ever heard it being explained.

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      Thank you for the compliment :) No I don't work for a university, but on occasion I help university students with their projects

  • @pebre79
    @pebre79 11 ปีที่แล้ว

    Wow, this is very helpful. You are a very good teacher!

  • @derekbanas
    @derekbanas  12 ปีที่แล้ว

    Your welcome :) I'm glad you guys are liking these

  • @kartickmanna8466
    @kartickmanna8466 7 ปีที่แล้ว

    You are a wonderful teacher .........
    Thank you for this kind of nice videos............

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you for the compliment :) I'm happy you like them

  • @cajogos
    @cajogos 11 ปีที่แล้ว

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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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 :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I do my best to help

  • @JacoxNovak
    @JacoxNovak 9 ปีที่แล้ว

    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

  • @love_exegence
    @love_exegence 8 ปีที่แล้ว +1

    In your diagrams you make LinedList seem like a List object. It took me a while to finally understand lol

  • @mooflaghero1
    @mooflaghero1 6 ปีที่แล้ว

    Was confused until the end once he actually made the list it made more sense.

  • @Apreston14
    @Apreston14 8 ปีที่แล้ว

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

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      Thank you for the nice compliment :)

  • @rujutafujuta
    @rujutafujuta 3 ปีที่แล้ว

    thankyou for explaining the way literally no one could

    • @derekbanas
      @derekbanas  3 ปีที่แล้ว

      Thank you very much :) I'm happy you enjoyed it

  • @paultrimor7466
    @paultrimor7466 9 ปีที่แล้ว +15

    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?

    • @olizelda
      @olizelda 8 ปีที่แล้ว +2

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

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    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

  • @felixkimutai8478
    @felixkimutai8478 6 ปีที่แล้ว

    I like the way you give explanation step by step, thanks

    • @derekbanas
      @derekbanas  6 ปีที่แล้ว

      I'm happy the video was useful :)

  • @giteshchopra3916
    @giteshchopra3916 9 ปีที่แล้ว

    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

  • @GGoblin
    @GGoblin 6 ปีที่แล้ว

    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

    • @GGoblin
      @GGoblin 6 ปีที่แล้ว

      and how the very first link or (first guy who moved in town) always refers to null

  • @TheGamingBigT
    @TheGamingBigT 11 ปีที่แล้ว

    Great tutorial, the moving in example was very clearing up! Thanks.

  • @Jadinandrews
    @Jadinandrews 8 ปีที่แล้ว +1

    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?

    • @Jadinandrews
      @Jadinandrews 8 ปีที่แล้ว

      So yeah, equals() is the correct way to compare strings, it just happens that == works sometimes.

    • @AdilRas
      @AdilRas 8 ปีที่แล้ว

      == compares memory addresses.

    • @Jadinandrews
      @Jadinandrews 8 ปีที่แล้ว

      which doesn't always return true when comparing strings, so it's not a good idea to use it this way.