@@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!
@@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.
@@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.
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
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.
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.
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.
@@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
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.
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
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.
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
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.
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
Bro explained DSA roadmap using DSA analogy and expected beginners to understand
glad I learned about graphs, DFS & BFS in discrete maths so I could understand everything he was saying & it definitely makes so much sense
Recursion
Dawg. Are you stupid? Anyone can google the names. This is the order he is recommending for you to learn things about.
@@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!
@@wisdomlounge4452 lol 😂
Bro explaining algorithm with algorithm😂😂
It's data structures with algorithms
Or uh
Bro is in too deep
Recursion, bitch!
Love how you explain it in a DSA way
Actually it's stupid because this video is for beginners who don't know what DFS and BFS are.
@@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.
@@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.
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
Wouldn't you be expected to use stacks to solve them in that particular section? Lots of problems can be done multiple ways
this reels time is iconic, just solved max path sum problem of trees, i feel gd understanding this reel fully
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.
Not just trees in bfs, it's all kind of graphs, but yeah.
This applies to discrete math as well. By the way! your explanation was on point!
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.
Neetcode said something similar already, but I felt like I wanted to lay out the thought I had.
what a gem, thank you!!!
Quality take.
Thanks for this
Bro used a technology meant to emulate the brain to explain how to train an actual brain, crazy
legendary explanation
Its a graph, and topological sorting can be used to study
BFS means go sideways before down the tree, for folks who haven’t studied it yet
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.
@@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
Great explanation. Nice work dude
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.
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
bro explain like a chad
this reminded me that I'm subscribed to neetcode! gotta go back and grind the dsa
Topological sort with nodes higher in the tree first should be optimal
DFS might be faster than BFS due to better cache locality because of the use of a stack.
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.
Real
You could have just said it's better to be a generalist than a specialist so tackle the beginning level data structures.
Gotta look at most frequently asked before the interview and do A+ search the night b4
It's not a decision tree its a path showing you prequist subjects to learn before going to the next subject
Do a topological sort to get the real order
Is it good way if yes like it and if you are an advance student at it !
you should add it to the interface
this should be topological sort
gonna follow this and see my lwvel of expertise in thai
Does exist a website to navigate these concepts one by one on this holy order given?
bro is so into algos
just shows how pervasive algorithms really are. yes, they're computer science topics, but computers are, thenselves, algorithmic machines. algorithms are everywhere.
Can you upload this learning path image?
It's on his website
neetcode.io/roadmap
gotta hand it to this guy, doing dsa to find out how to do dsa
Goat of CS
nerding out!!
Pre-requisite to understand this short:
BFS and DFS
Ok but what should I learn amd how should I learn it to understand your strategy here
this is badass
its easy to understand bro yall are tweaking. nice explanation
When in doubt, BFS Hakari
Just do the topological sort
What’s the diagramming program
Not a fan of the array first tbh. Array has so many different techniques
Where to learn dsa from zero to hero please ?
Understood
in normal language: cover all the fundamentals first and go into advanced concepts step by step
What graph is this?
this is actually so funny lol
Beautiful
How can I read these tiny letters? Am I missing something?
Bro used Recursion irl: used Algorithms to make beginners learn Algorithms.
Nice!
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
Where's the code for this algorithm
0:02
Anybody have a link to this learning forest that he’s using as an example?
you can find it here neetcode.io/roadmap
this guy
where can i get this graph?
It’s actually the neetcode website.
Genius
what is he using
A tree can not have a circuit, you'll learn this when you get to graphs
Wait, so is she dtf then or not? And why is there a Christmas tree? 🎄
"Most common topics are at the beginning"
Yeah and chocolate tastes very chocolaty
bro wth is bfs
Breadth first Search aka going to all nodes at a level before going deeper in any of them.
Best friend since
no stone left unturned
Wow
It's not the eye is blind but that image make you
Algithm
Ah so actually topological sort
Bro went meta
I’m the one that asked this 🤓
Apply Topological Sort 😂❤
why is this so funny to me
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.
Idk why but you sound like the programmer version of Dr K.
I can'tttttttttttt 😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂😂
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
it's not a tree cuz it's a DAG
Bro, do you ever get outside? Cause I see you always talking about Algorithms.
BFS obviously 😂
I'm four months into programming, and I don't know what the hell you're talking about, mate
This is so troll 😂
I understand nothing
noob developer here . Why isnt any Hashing part of this?
This shit is meta
Bruh..
Is this dude fried
DSA brain rot
too much drugs
R u gonna stop making policies in block n stop altering the sight of me for the sight of u nothingness nullifiers