Best Order to Learn Algorithms & Data Structures

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

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

  • @rulercostax
    @rulercostax 10 месяцев назад +2835

    Bro explained DSA roadmap using DSA analogy and expected beginners to understand

    • @doofus8
      @doofus8 10 месяцев назад +93

      glad I learned about graphs, DFS & BFS in discrete maths so I could understand everything he was saying & it definitely makes so much sense

    • @natescode
      @natescode 10 месяцев назад +25

      Recursion

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

      Dawg. Are you stupid? Anyone can google the names. This is the order he is recommending for you to learn things about.

    • @wisdomlounge4452
      @wisdomlounge4452 9 месяцев назад +23

      @@doofus8 After he read your comment I'm sure this RUclipsr snapped his fingers and sighed in disappointment for failing to confuse you like he did the rest of us, lol!

    • @doofus8
      @doofus8 9 месяцев назад +1

      @@wisdomlounge4452 lol 😂

  • @vigneshs1852
    @vigneshs1852 10 месяцев назад +1689

    Bro explaining algorithm with algorithm😂😂

  • @z40140110
    @z40140110 10 месяцев назад +330

    Love how you explain it in a DSA way

    • @sectorgamma
      @sectorgamma 7 месяцев назад +6

      Actually it's stupid because this video is for beginners who don't know what DFS and BFS are.

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

      @@sectorgamma if they can't figure it out from context, they're probably going to give up quickly no matter how good the learning material is. it's in the name. it's easily figured out by simply breaking it down and thinking about it for a minute. or googling if that fails.

    • @notmo.
      @notmo. 18 дней назад +1

      ​@@blarghblarghExpecting beginners to know technical terms doesn't make a very good teacher. Normally the more knowledgeable you are on a topic the easier you can break it down into an oversimplified explanation.

  • @adi_cs03
    @adi_cs03 10 месяцев назад +114

    You need to update the 'Stack' section. More than half of the questions in there are related to dynamic programming and don't even need a stack to solve them

    • @gabrielhicks8043
      @gabrielhicks8043 4 месяца назад +17

      Wouldn't you be expected to use stacks to solve them in that particular section? Lots of problems can be done multiple ways

  • @kanishkkala16
    @kanishkkala16 10 месяцев назад +33

    this reels time is iconic, just solved max path sum problem of trees, i feel gd understanding this reel fully

  • @Kaczynskibutnotted
    @Kaczynskibutnotted 9 месяцев назад +156

    Breadth-first search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root and explores all nodes at the present depth prior to moving on to the nodes at the next depth level. Extra memory, usually a queue, is needed to keep track of the child nodes that were encountered but not yet explored.
    Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking. Extra memory, usually a stack, is needed to keep track of the nodes discovered so far along a specified branch which helps in backtracking of the graph.

    • @dpkass
      @dpkass 7 месяцев назад +2

      Not just trees in bfs, it's all kind of graphs, but yeah.

    • @pratikthorat3480
      @pratikthorat3480 4 месяца назад

      This applies to discrete math as well. By the way! your explanation was on point!

  • @intptointp
    @intptointp 10 месяцев назад +108

    Here's my theory on learning in general.
    Learning is more like learning how to drive than it is...
    Memorizing a manual.
    When you learn how to drive, there is a huge gap between knowing how to do it, and being able to do it.
    What is the gap?
    Essentially, having the trained neural networks in your brain.
    You train neural networks with immense collections of data.
    I personally would approach it like training a neural network.
    This means...
    1) Gather as much labeled data as possible. Look at the terms, concepts, answers, and the questions and process their reasoning.
    2) Do far more than you think would be enough to "get it logically". You're not trying to get to the point to get it logically. You're looking to get to the point where you are an optimally-trained model.
    3) Backpropagate and error correct. When you get something wrong, trace your reasoning back and see exactly why your network didn't connect it. Adjust that node in your mind.
    4) Repeat this constantly.
    In my opinion, this view gives you the sort of philosophy that makes being good at this inevitable.
    To put that philosophy in words... it means that no one is perfect at this, and it means that your measure for success is not getting it right. It is "having a powerfully trained model".
    Or in layman terms, your considerations and the process that emerges from your mind on how to solve this new problem is structured in such a way that it quite reliably takes you to the correct answer as your model runs through the novel problem.
    Put more concisely, you want to optimize for a well-trained problem-solving approach mental model.
    Not “try to get everything right”. That’s too information-poor.
    Optimizing the problem-solving model is far more possible.

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

      Neetcode said something similar already, but I felt like I wanted to lay out the thought I had.

    • @Zero-bg2vr
      @Zero-bg2vr 10 месяцев назад +8

      what a gem, thank you!!!

    • @raheem2845
      @raheem2845 10 месяцев назад +7

      Quality take.

    • @dotnuel
      @dotnuel 9 месяцев назад +1

      Thanks for this

    • @hanznathanpo
      @hanznathanpo 8 месяцев назад +14

      Bro used a technology meant to emulate the brain to explain how to train an actual brain, crazy

  • @TheDoubleMvp
    @TheDoubleMvp 10 месяцев назад +11

    legendary explanation

  • @vishaltiwari7180
    @vishaltiwari7180 7 месяцев назад +2

    Its a graph, and topological sorting can be used to study

  • @MusaMuhammadKhan
    @MusaMuhammadKhan 4 месяца назад +8

    BFS means go sideways before down the tree, for folks who haven’t studied it yet

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

      show people on the street a picture of a tree graph. ask them "depth first search. what would you guess that would mean? if you don't know, take a guess. if you don't think you can guess, think about it for for a minute. if you can't figure it out from that, you're allowed to use your smart phone"
      a passing grade doesn't require explaining the steps of the algorithm. roughly pointing at the nodes and saying which order, and being roughly right, would be sufficient.
      if they can't pass that test, programming is not the calling for them.
      if you are interested in training people, I suggest doing some experiments like that yourself, so you can figure out what sorts of things the general public is capable of.

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

      ​@@blarghblargh if the picture has a circle encircling the root up to the leaf node, then interviewer said "DFS" and another picture has a circle encircling the node and nodes beside it and said "BFS", i would get it

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

    Great explanation. Nice work dude

  • @HeraldOfTheDawn
    @HeraldOfTheDawn 5 месяцев назад +6

    Let me give you a real life example of BFS and DFS.
    Lets say you are working on a project where you send a file through-frontend, and the server sends a file (processed).
    BFS is when you complete every single step properly before moving onto next one. You create a clean front-end with CSS, JS and error handling and all. And move onto server, process the data, handle errors there and send the file.
    DFS is when you create an input element to send the file to the server. You process the data in the file, and send it back to the front-end. (You reached the outcome of your project first) And only then you cover error handling and design and all of that other stuff.
    So, depth first is where you reach the absolute depth and come back to the top collecting all of the remaining infinity stones where breadth first is you collect all of the stones around you at each step of your journey.

  • @vteckickedin2365
    @vteckickedin2365 10 месяцев назад +1

    imo, if you understand these concepts (e.g. in my case I've almost finished my cs degree so I know the concepts, but I still need more practise) its better to vary your practise. Studies show this is more effective

  • @NgynAn-dg3kp
    @NgynAn-dg3kp 10 месяцев назад +5

    bro explain like a chad

  • @y.t.sail764
    @y.t.sail764 5 месяцев назад

    this reminded me that I'm subscribed to neetcode! gotta go back and grind the dsa

  • @karizadk3875
    @karizadk3875 4 месяца назад

    Topological sort with nodes higher in the tree first should be optimal

  • @jaime7295
    @jaime7295 4 месяца назад

    DFS might be faster than BFS due to better cache locality because of the use of a stack.

  • @benjamin7853
    @benjamin7853 7 месяцев назад +1

    BFS might not work either because that doesn't solve the problem of possibly reaching nodes without doing the prerequisites first. You'd need a topological sort in other words.

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

    You could have just said it's better to be a generalist than a specialist so tackle the beginning level data structures.

  • @lalalander8257
    @lalalander8257 8 месяцев назад +2

    Gotta look at most frequently asked before the interview and do A+ search the night b4

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

    It's not a decision tree its a path showing you prequist subjects to learn before going to the next subject

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

    Do a topological sort to get the real order

  • @pari_jan8333
    @pari_jan8333 18 часов назад

    Is it good way if yes like it and if you are an advance student at it !

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

    you should add it to the interface

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

    this should be topological sort

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

    gonna follow this and see my lwvel of expertise in thai

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

    Does exist a website to navigate these concepts one by one on this holy order given?

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

    bro is so into algos

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

    just shows how pervasive algorithms really are. yes, they're computer science topics, but computers are, thenselves, algorithmic machines. algorithms are everywhere.

  • @HowlingDeath
    @HowlingDeath 10 месяцев назад +13

    Can you upload this learning path image?

  • @donalshijan5615
    @donalshijan5615 7 месяцев назад

    gotta hand it to this guy, doing dsa to find out how to do dsa

  • @dabocousin
    @dabocousin 7 месяцев назад

    Goat of CS

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

    nerding out!!

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

    Pre-requisite to understand this short:
    BFS and DFS

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

    Ok but what should I learn amd how should I learn it to understand your strategy here

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

    this is badass

  • @rythmgamer8189
    @rythmgamer8189 9 месяцев назад +1

    its easy to understand bro yall are tweaking. nice explanation

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

    When in doubt, BFS Hakari

  • @Sonu.Singh.28
    @Sonu.Singh.28 5 месяцев назад

    Just do the topological sort

  • @Wassertivo
    @Wassertivo 8 месяцев назад +1

    What’s the diagramming program

  • @KeL-r1z
    @KeL-r1z 7 месяцев назад +1

    Not a fan of the array first tbh. Array has so many different techniques

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

    Where to learn dsa from zero to hero please ?

  • @rustin2380
    @rustin2380 7 месяцев назад

    Understood

  • @je4a301
    @je4a301 10 дней назад

    in normal language: cover all the fundamentals first and go into advanced concepts step by step

  • @davidson2727what
    @davidson2727what 4 месяца назад

    What graph is this?

  • @miguelperezpal
    @miguelperezpal Месяц назад +1

    this is actually so funny lol

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

    Beautiful

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

    How can I read these tiny letters? Am I missing something?

  • @MdKamrulIslam-lo9xn
    @MdKamrulIslam-lo9xn 10 месяцев назад +12

    Bro used Recursion irl: used Algorithms to make beginners learn Algorithms.

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

    Nice!

  • @asdasd-jg1re
    @asdasd-jg1re 10 месяцев назад +1

    learn, practice, put in time, don't look for shortcuts. Make it a habit. get a roadmap to follow but stop asking "best way, efficient way", there isn't one

  • @richardly1543
    @richardly1543 4 месяца назад

    Where's the code for this algorithm

  • @MrPool-fk9ll
    @MrPool-fk9ll 10 дней назад

    0:02

  • @JohnWasinger
    @JohnWasinger 7 месяцев назад

    Anybody have a link to this learning forest that he’s using as an example?

    • @NeetCodeIO
      @NeetCodeIO  7 месяцев назад +1

      you can find it here neetcode.io/roadmap

  • @abrahamolaobaju2266
    @abrahamolaobaju2266 8 месяцев назад +1

    this guy

  • @zixunhao7764
    @zixunhao7764 4 месяца назад

    where can i get this graph?

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

    Genius

  • @Real_Gamer_clips
    @Real_Gamer_clips 7 месяцев назад

    what is he using

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

    A tree can not have a circuit, you'll learn this when you get to graphs

  • @Viper-sn5cx
    @Viper-sn5cx 5 месяцев назад

    Wait, so is she dtf then or not? And why is there a Christmas tree? 🎄

  • @skillpolice5348
    @skillpolice5348 7 месяцев назад

    "Most common topics are at the beginning"
    Yeah and chocolate tastes very chocolaty

  • @ELMlKO
    @ELMlKO 10 месяцев назад +5

    bro wth is bfs

    • @mayukhawasthi8156
      @mayukhawasthi8156 10 месяцев назад +4

      Breadth first Search aka going to all nodes at a level before going deeper in any of them.

    • @igorcastilhos
      @igorcastilhos 10 месяцев назад +4

      Best friend since

    • @spht9ng
      @spht9ng 5 месяцев назад +1

      no stone left unturned

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

    Wow

  • @navedkhan6643
    @navedkhan6643 7 месяцев назад

    It's not the eye is blind but that image make you

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

    Algithm

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

    Ah so actually topological sort

  • @Oi-mj6dv
    @Oi-mj6dv Месяц назад

    Bro went meta

  • @gadoosher
    @gadoosher 10 месяцев назад +1

    I’m the one that asked this 🤓

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

    Apply Topological Sort 😂❤

  • @ohwen
    @ohwen 5 месяцев назад +1

    why is this so funny to me

  • @shizo1013
    @shizo1013 29 дней назад

    To be completely honest. You didn't really have to talk about all that. He asked a question, but then followed it up with "should I go through the graph in order". You explain everything, and come to the conclusion that yes, you should go in order. So just say "yes". I know that would make you lose out on content but you're clipfarming this guy lol.

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

    Idk why but you sound like the programmer version of Dr K.

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

    I can'tttttttttttt 😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂

  • @fr0xk
    @fr0xk 10 дней назад

    This is all nonsense. You will ever need only like one short algorithm, one search algorithm and one graph algorithm. Quick short is minimalist, no memory overhead, binary search has no recursion, DFS uses explicit stacks.
    Anything else required, you'll need to reconsider the design philosophy of that software

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

    it's not a tree cuz it's a DAG

  • @and_then_I_whispered
    @and_then_I_whispered 7 месяцев назад

    Bro, do you ever get outside? Cause I see you always talking about Algorithms.

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

    BFS obviously 😂

  • @lukewood2662
    @lukewood2662 7 месяцев назад

    I'm four months into programming, and I don't know what the hell you're talking about, mate

  • @popcornpaat
    @popcornpaat 9 месяцев назад +1

    This is so troll 😂

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

    I understand nothing

  • @LeninMcDonalds
    @LeninMcDonalds 28 дней назад

    noob developer here . Why isnt any Hashing part of this?

  • @drover7476
    @drover7476 7 месяцев назад

    This shit is meta

  • @tarunsetty109
    @tarunsetty109 4 месяца назад

    Bruh..

  • @quicksilver1752
    @quicksilver1752 7 дней назад

    Is this dude fried

  • @zakariya9898
    @zakariya9898 7 месяцев назад

    DSA brain rot

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

    too much drugs

  • @000JALB
    @000JALB 20 дней назад

    R u gonna stop making policies in block n stop altering the sight of me for the sight of u nothingness nullifiers