Learn Linked Lists in 13 minutes 🔗

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

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

  • @BroCodez
    @BroCodez  3 года назад +202

    TL;DR
    small data set: LinkedList = BAD
    large data set + lots of searching: LinkedList = BAD
    large data set + lots of inserting/deleting: LinkedList = GOOD
    import java.util.LinkedList;
    public class Main{

    public static void main(String[] args) {
    // *******************************************************

    // LinkedList = Nodes are in 2 parts (data + address)
    // Nodes are in non-consecutive memory locations
    // Elements are linked using pointers

    // advantages?
    // 1. Dynamic Data Structure (allocates needed memory while running)
    // 2. Insertion and Deletion of Nodes is easy. O(1)
    // 3. No/Low memory waste

    // disadvantages?
    // 1. Greater memory usage (additional pointer)
    // 2. No random access of elements (no index [i])
    // 3. Accessing/searching elements is more time consuming. O(n)

    // uses?
    // 1. implement Stacks/Queues
    // 2. GPS navigation
    // 3. music playlist
    //

    // *******************************************************
    LinkedList linkedList = new LinkedList();
    /*
    // LinkedList as a Stack
    linkedList.push("A");
    linkedList.push("B");
    linkedList.push("C");
    linkedList.push("D");
    linkedList.push("F");
    linkedList.pop();
    */
    // LinkedList as a Queue
    linkedList.offer("A");
    linkedList.offer("B");
    linkedList.offer("C");
    linkedList.offer("D");
    linkedList.offer("F");
    //linkedList.poll();

    //linkedList.add(4, "E");
    //linkedList.remove("E");
    //System.out.println(linkedList.indexOf("F"));


    //System.out.println(linkedList.peekFirst());
    //System.out.println(linkedList.peekLast());
    //linkedList.addFirst("0");
    //linkedList.addLast("G");
    //String first = linkedList.removeFirst();
    //String last = linkedList.removeLast();

    System.out.println(linkedList);

    }
    }

  • @geeknet07
    @geeknet07 3 года назад +138

    This channel doesn't have normal content.
    rather masterpieces

  • @leihan2670
    @leihan2670 Год назад +41

    I just love the way you teach, straightforward, easy, and clear。 Lucky to have you in this world

  • @JamesZApex
    @JamesZApex 3 года назад +163

    Your videos teach me more than my professor.

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

      More knowledge in a shorter period of time

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

      they're really practical

    • @Ryder-gd9tl
      @Ryder-gd9tl Год назад +1

      seriously same lol, learned in 10 min what took my professor a 90min lecture

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

      True😹

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

      Same here, I wish I could pinpoint why this is so common, honestly it's concerning that "professionals" are getting dunked on by youtube.

  • @amadujalloh4700
    @amadujalloh4700 3 года назад +24

    My bro who code;
    You are the best man
    I am a CS student in The Gambia 🇬🇲!
    This channel is awesome

  • @marklaw3938
    @marklaw3938 3 года назад +42

    What a godsend of a video. I'm crrently doing online CS 1103 course and literally the topic for this week is about linked lists. Thank you for this video. Your videos have truly helpful in my studies thus far.

    • @BroCodez
      @BroCodez  3 года назад +8

      Awesome! Looks like I made this video just in time!
      I'm glad they're helping!

  • @adityajain7486
    @adityajain7486 3 года назад +18

    You are a god of programming, Thank you for making my life easier. you are way more better than my stupid college teachers.

  • @Wonder_Chariot
    @Wonder_Chariot 4 месяца назад +1

    I absolutely love the way bro introduces himself. i love you bro

  • @Farhadpeymani
    @Farhadpeymani 5 дней назад

    Gosh! This channel is simply A TREASURE!

  • @deafprophets9009
    @deafprophets9009 11 месяцев назад +1

    That was the most simple straightforward no bs explanation for a data structure ever. You make DS&A look approachable!! Thanks for the content 🙏

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

    This is the only explanation I've been able to comprehend. Thank you

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

    OMG you just helped me to understand in laymen's terms what my professor and multiple other youtubers couldn't

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

    Awesome, simple explanation covering LinkedList thanks

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

    Awesome teaching guide not only teach easily to understand but coding clearly. Thanks greatly!

  • @shivamjha5962
    @shivamjha5962 2 года назад +4

    A docx/pdf file of this courses source codes and notes will be really helpful...thanks for keeping this course free really means a lot!!

  • @agentpenguin3966
    @agentpenguin3966 3 месяца назад

    Thank you so much for the detailed explanation, along with the 'uses' at the end.

  • @syedmaaz2374
    @syedmaaz2374 2 года назад +4

    I buy 2500 rupees course to understand DSA but now i realise my money is waste .Because you more better than course

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

    your videos make me LOOOVE coding!! never thought I would say that so THANK YOU 🙏🙏

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

    Bro, just what I nedded for a project!!!!
    You are awesome sir.

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

      Nice! I made it just in time then!

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

      @@BroCodez Bro, I want to contact you. How to do so?

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

    The first 5 minutes of this explained it better than a year of university

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

      Fun fact: he learned from your University

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

    it is unfair that this video only has 554 likes at the time of my viewing , you explained in under 15 minutes , what took my professor 3 hours and 2 slideshows

  • @burn-e-e6980
    @burn-e-e6980 Год назад +1

    Amazing teaching way really like it

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

    OMG right on time!! Are you reading our minds?

  • @supersheep1000
    @supersheep1000 11 дней назад

    The one million elements graphic gave me a good chuckle.

  • @Farhadpeymani
    @Farhadpeymani 5 дней назад

    Bro, this is simply PERFECTION!
    Nice job Man! Now that is a ALPHA!
    Keep it up Bro!

  • @aCyberVoid
    @aCyberVoid 3 месяца назад

    I did a happy dance because of how simply you explained this, so even those curious can see if this is something they want to do as far as becoming a programmer. I'm expanding into more complex concepts in Python. this has helped me grasp a concept faster than cheetahs racing. You got yourself a new subscriber!! :D

  • @danielm2123
    @danielm2123 2 месяца назад

    You saved me during my data structures class

  • @oni1ecram123
    @oni1ecram123 3 года назад +8

    "666 Crime circle "....that adress sounds so dark...😅😅

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

    This man teaches Programming better than any college would do.

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

    Just found your channel. One of my fav dev channels on YT. Proud to call myself a bro 🤙🏼

  • @fredrexsalac961
    @fredrexsalac961 2 месяца назад

    i hope this discussion will be followed the instructions during my next meeting within my instructor

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

    Awesome video, again Gold standard teaching methods!

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

    Hey bro, could you please do one on singlys like using the linked list class. This is eternally helpful, though I’m struggling to find tutorials on youtube that cover anything like the ListNode class, so if you could that would be amazing because your videos are the best!

  • @anasalsaabi5657
    @anasalsaabi5657 18 дней назад

    Thanks a lot bro your videos are amazing and the best in explaining

  • @wecari
    @wecari 2 месяца назад

    Fastest I have ever subscribed to a channel. I wasn't even half way through the video.
    Well done bro. 😊

  • @stevend1394
    @stevend1394 10 месяцев назад

    I'm here again to refresh my knowledge.

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

    Pretty helpful thank you so much sir

  • @rahulmandal1380
    @rahulmandal1380 3 года назад +6

    Hlw Bro Code!
    Keep updating this playlist at regular intervals.
    The way you explain is Awesome..
    😊😊😊😊😀😀😀

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

      Thanks! I will!
      Weekly is a good interval, these are tough topics to discuss 😅

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

    🚀100K+ soon! Thanks, Bro you're our hero!

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

    Thanks for the concise explanation, I feel confident for my quiz!

  • @Lalogum
    @Lalogum 5 месяцев назад

    better than all my prof. much love

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

    So I am learning C for Windows development and Red Teaming from a source that is great but cuts a lot of bullshit and goes quite quick. Im learning a lot but some concepts could do with a little bit more explanation. Thats where my Bro comes in! And I know this is JAVA but the concept is the same and these are Absolutely FANTASTIC explanations. Great to fill in the missing pieces with padding where needed. Thanks a lot man ! you really really help!

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

    TL;DR
    small data set: LinkedList = BAD
    large data set + lots of searching: LinkedList = BAD
    large data set + lots of inserting/deleting: LinkedList = GOOD
    better are arraylists for seraching and it works like queue and stack

  • @DanishFarhan-wg3xz
    @DanishFarhan-wg3xz 5 месяцев назад

    so many informations in one video :>. thanks

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

    This was extremely helpful, thank you!

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

    Thank you very muchh! I've been struggling alot about linklist address pointers and arrays for so long , but i watched just 10 mins of yours and I now understand everything! Thanks again brooo T-T

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

    I've become BROOOOOO!!! Thanks broo, you are the best!!!

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

    gave a like before watching coz i know it will be amazing as always

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

    Great as always

  • @НуркамалНурмухамед

    Holy shit, that’s incredible man. I really like your tutorials

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

    We on a roll tonight! Thanks for sharing bro.

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

    Fantastic content!

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

    Hahahaha never stop surprising me! Each video is literally blowing my mind, what a way of explaining! Keep it up!

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

    Great video, simple and understandable

  • @goddesscoder
    @goddesscoder 2 месяца назад

    BRO!! THANK YOU SOOOO MUCH!!! I understand😭

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

    Nice class

  • @ottttoooo
    @ottttoooo 3 года назад +13

    Hey Bro, I just finished the java for beginners playlist, it was very well done btw! Prior to that, I had absolutely zero experience in coding, and that was a great start.
    What would you recommend for me next? maybe specific projects I could work on to improve my skills? because I feel kinda lost now :D
    Thank you!

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

      I've been solving problems on leetcode and hackerrank
      That's how I ended up here, because I've never heard of a linked list despite following Bro Code for like 3 months now

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

    Idk there's really nobody that explains anything like our fellow "Bro". Completely, underrated and undervalued! Thank you for what you do video after video. Btw we need more input more input lol

  • @MuhammadUsman-qe1st
    @MuhammadUsman-qe1st 2 месяца назад

    cleared my concept finally

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

    Hey, Bro! Could you (or any other of you folks grasping big Oh notation) explain, why inserting and deleting is O(1) and not O(n)? Would'nt the algorithm need to traverse the nodes to find the appropriate place to change the addresses for the newly created element?

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

      I'm still learning, but i've also been thinking about this, and i think you're right. The time complexity of O(1) for deleting and adding data in a linked list is only at the beginning and end of the list, because there is no need to shift elements like in an array. However, the time complexity becomes linear, O(n), if the element is somewhere "inside" the list. Because linked lists do not have indexes (that's the whole point), the element you want to delete or change within a list has to be found first, and as i understand, it is done by traversing the list. You have to go through all the elements of the list until the end or until a matching element is found.
      So the main advantage of linked lists over arrays is that they can shrink and grow faster if elements are added or deleted from the beginning or end of a list.

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

      @@Russ2049also learning but I think deleting at end is O(n) not O(1) since you need to transverse through the whole thing to know where the new end is. Deleting at the beginning is definitely O(1) though

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

    Really awesome.

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

    Amazing explanation

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

    You are my real JavaBro =) thanks a lot

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

    thank you bro , loved it , its so detailed and wasy to understand

  • @solonton6341
    @solonton6341 2 года назад +2

    Thanks for this great video. Can you implement the linked list from scratch?

  • @yasmineibr
    @yasmineibr 10 месяцев назад

    very very helpful thank you!

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

    my bro is here thank you :)+)

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

    Thank you Bro!

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

    Thank you so much bro💫life saving💓

  • @emreotu4464
    @emreotu4464 18 дней назад

    Learn Linked Lists in 13 minutes 🔗

  • @murtazahuzefa5086
    @murtazahuzefa5086 2 месяца назад

    I ❤ your videos ❤❤❤❤❤

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

    Awesome content, tks a lot!!!

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

    I demand to see what's behind those D&D files!

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

    Great video, thanks!

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

    A video on how to reverse a Linked List please. Btw love your videos 🙌

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

    Awsome

  • @nimaMotlagh-z8c
    @nimaMotlagh-z8c 6 месяцев назад

    Perfect

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

    Awesome.

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

    Thx Bro for all your videos, i love them all, plz finish as much as u canbon data structure, then plz java design patterns, generics, functional prog. in java (lambda expressions), and parallel programing. Anything you like...

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

    Self learner here I do driver development for fun and I could vouch u are him

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

    better from the best coder i know . would you please consider doing it in pytohn

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

    thanks , very clear

  • @RAHULSINGH-sn2ol
    @RAHULSINGH-sn2ol 3 года назад

    Much better than my professor,
    Keep it up Bro
    #brocode👍

  • @VinothKumar-ut4rj
    @VinothKumar-ut4rj Год назад

    bro please make a video about operations and all operators applicable with 'objects' in java.

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

    thank you.

  • @manzil.8105
    @manzil.8105 Год назад

    king , that is what you are , nothing more , nothing less

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

    Awesome Bro

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

    Nice

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

    You are doing good...
    I'm your new subscriber ^_^

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

    Love your videos. They are so good. Did you add and remove an element but didn't show add working?

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

    Thanks a Lott!!!!!!!!!. brooooooo

  • @ryz3929
    @ryz3929 3 месяца назад

    u r a legend

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

    My exam's tomorrow 💀thank you man

  • @DavidOwen-e7s
    @DavidOwen-e7s 5 месяцев назад

    random comment to help the algorithm :)

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

    great, thank you, bro!

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

    Thanks Bro, I always checkout your videos to finally understand these kind of topics. I would really love to meet the person who has hit the dislike button.

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

    Please dont stop making videos although you are getting less views and likes we know your videos are worthy and very helpfull for us

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

    Thanks brocode . this helped me a lot

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

    super

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

    Can you do some object oriented code for Java. Love your channel and need it to not fail my class. Threads and recursive methods and stuff 🥵🙈??