actually bonus has been asked in my interview round of algouniversity so it should be in important one and dijkstra is very much common and asked in interview
Thanks for the informative videos. Just a small correction about the time complexity of DFS and BFS: it is not O(V) where V is the number of nodes, but O(V+E), where you should consider the edges as well.
Hey i know bfs ,dfs topo,dijkstra but don't know Floyd warshall prim kruksal right now should i could follow neetcode graph playlists i am tired of just learning new algos i want to solve question to particular these algos after solving some questions i will move to others algos could you guide ?
The time complexity of graph traversals is actually O(V + E), where V is the number of nodes, and E is the number of edges. Graph traversals are only (n) when the graph is a tree with a fixed amount of children(like a binary tree)
@@anonymoussloth6687 Hey sorry for responding kind of late, but think of the graph as an adjacency list/hash-map. If you want to traverse the entire graph, you need to traverse each key(vertex) and every value (edge). Therefore, the time complexity is O(V + E)
BFS + topological sort is more complex but feels more intuitive (to me). There's more code as you need to manage "in degrees" (the number of incoming edges to a node) and you need a queue (common in BFS).
The algorithms were created for optimizing software, deliver efficient solutions, but nowadays most of the companies use them to filter out candidates in job interviews and look cool🤦🏽♀️, once you get into the company you probably are not going to hear about that never again
Topological sort is IMHO less obscure than Union Find or Dijsktra's. The latter are more well known by name because they are illustrative for didactics, e.g. Union Find is the first major algorithm introduced in Sedgewick's book as a case study, before returning to a more orderly review of algorithms. Topological sort is, conversely, is an extenstion to a wide variety of well known practical problems like ordering a course schedule or execution of project or (automated) job dependencies. Cracking the Code Interview even argues you should be able to derive it on the spot if you didn't know it (I disagree but shrug). Its a minor point but I think people might see it and think they should study it last, where as IMHO its more expected knowledge than Dijkstra's and also really easy to understand once you've done a few DFS problems!
Great set of problems! Are the problems sorted in order of importance/frequency encountered (IE DFS most important/frequent, Djikstra's algo least important/frequent)?
At 5:22 you say "which is how I was taught" so could you let us know who taught you and how you started to come up with these approaches to solve all these problems?
Hi can any one help me here, I used to be python coder but got laid off in April and now I want to switch into more development side I am doing dsa only for sometime what other skill should i focus on
You can implement topo sort either way, doesn't really matter. Either use BFS, "remove" edges by subtracting indegrees on vertices and add when indeg[u] = 0, or just build the DFS tree.
You can implement topo sort either way, doesn't really matter. Either use BFS, "remove" edges by subtracting indegrees on vertices and add when indeg[u] = 0, or just build the DFS tree.
🚀 neetcode.io/ - I created a FREE site to make interview prep a lot easier, hope it helps! ❤
Unfortunately VMv4 doesn't work when redeemed as a coupon
@@DennisWanyonyi qqqqqq++q++qqqqq+qqq++qqqqq+++qqqqqqqqqqqqqqqqq11q+qq
@@DennisWanyonyi q+qqqqqq++++q+qqq+q+qq+++qqqqqq1q++q+qqqqq+++++++++++++++
Dude I sincerely can't thank you enough. I'm studying for job interviews and your content is the only reason I feel semi-confident going into them
semi confident lmfao.btw ALL THE BEST.
Lol I feel you, thank you @NeetCode
I make these words my own.
Did you get the interview?
bro did you land in a job ?
1) DFS
2) BFS
3) Union Find
4) Topological Sort
5) Dijkstra's Algorithm
Bonus (Not as frequently asked)-
1) Prim's/Kruskal's Algorithm (MST)
2) Floyd Warshall's Algorithm
actually bonus has been asked in my interview round of algouniversity so it should be in important one and dijkstra is very much common and asked in interview
Thanks for the informative videos. Just a small correction about the time complexity of DFS and BFS: it is not O(V) where V is the number of nodes, but O(V+E), where you should consider the edges as well.
Ur playlist is the reason I feel confident with Graph questions. Thanks Man!!
Hey i know bfs ,dfs topo,dijkstra but don't know Floyd warshall prim kruksal right now should i could follow neetcode graph playlists i am tired of just learning new algos i want to solve question to particular these algos after solving some questions i will move to others algos could you guide ?
i think it’s pronounced dye-kstras algorithm btw
🤓☝️
Witcher 3 also has a character named dijkstra.
Dyke straw lol
Yea and they pronounce him dee 'k stra. After playing it, i always called it that calling others pronunciation as uncouth
The time complexity of graph traversals is actually O(V + E), where V is the number of nodes, and E is the number of edges. Graph traversals are only (n) when the graph is a tree with a fixed amount of children(like a binary tree)
Can u explain how it is V+E in detail?
@@anonymoussloth6687 Hey sorry for responding kind of late, but think of the graph as an adjacency list/hash-map. If you want to traverse the entire graph, you need to traverse each key(vertex) and every value (edge). Therefore, the time complexity is O(V + E)
JUDA FROM CSCAREERSDEV?
@@simonchristian160 yessir
Only bez of Ur playlist is the reason i think i will get a good job . absolutely wonderful videos on DSA . I lov u bro.
7:33 isn't topological sort actually identical to BFS?
Yeah that's what I think as well🤔
In that case yes, but because he picked a bad example.
Topo could be extended by both dfs and bfs(also called as khan's algo)
Just fyi, the Di in Dijkstra is pronounced like Di in Dice
Thanks for the video
Witcher 3 players would know
It's a remainder that you are doing amazing 😁👍🏻
Its really helpful that you categorize every problem and made a separate folder
One of the best interview preparation channel
Why isn't Top Sort BFS since it looks like you are doing level order traversal?
BFS + topological sort is more complex but feels more intuitive (to me).
There's more code as you need to manage "in degrees" (the number of incoming edges to a node) and you need a queue (common in BFS).
The algorithms were created for optimizing software, deliver efficient solutions, but nowadays most of the companies use them to filter out candidates in job interviews and look cool🤦🏽♀️, once you get into the company you probably are not going to hear about that never again
This is 100% correct.
Topological sort is IMHO less obscure than Union Find or Dijsktra's. The latter are more well known by name because they are illustrative for didactics, e.g. Union Find is the first major algorithm introduced in Sedgewick's book as a case study, before returning to a more orderly review of algorithms. Topological sort is, conversely, is an extenstion to a wide variety of well known practical problems like ordering a course schedule or execution of project or (automated) job dependencies. Cracking the Code Interview even argues you should be able to derive it on the spot if you didn't know it (I disagree but shrug). Its a minor point but I think people might see it and think they should study it last, where as IMHO its more expected knowledge than Dijkstra's and also really easy to understand once you've done a few DFS problems!
damn bro you really are just talkin. Power to u brudder
Because of your content..I feel confident while giving interview...huge respect❤
What about Bellman Ford or Floyd Warshall Algo
Shouldnt topological sort use bfs? Since we would have to print all nodes that are at the same level or depth before going further?
Yeah you're right, I think most people do bfs, but I usually do it dfs which is more simple imo (I used dfs for the alien dictionary problem)
this content is gold, man
You are the best! Thank you soooo much)
Great set of problems! Are the problems sorted in order of importance/frequency encountered (IE DFS most important/frequent, Djikstra's algo least important/frequent)?
would highly appreciate if you can solve 636. Exclusive Time of Functions
At 5:22 you say "which is how I was taught" so could you let us know who taught you and how you started to come up with these approaches to solve all these problems?
Nice topic! Thanks
We need a video for LeetCode 1319!
time complexity of dfs isn't O(V+E)?
Why so less subscribers dnt know
You mention a lot hashset is there any video recommended to learn about that data structure? Most focus on implementation
hello everyone,, lets write some neetcode today.
What about bellman ford's algo? Not so common?
I know bfs ,dfs,topo sort dijkasta and uninon find little bit too should i start solving questions ?
upload more videos on graphs sir
Hi can any one help me here, I used to be python coder but got laid off in April and now I want to switch into more development side I am doing dsa only for sometime what other skill should i focus on
Thankyou so much
Good One.
Does topological sort use dfs or bfs? From explanation it’s describing bfs 😮
@neetcode
You can implement topo sort either way, doesn't really matter. Either use BFS, "remove" edges by subtracting indegrees on vertices and add when indeg[u] = 0, or just build the DFS tree.
shouldn't topological sort be BFS and not DFS? (minor error?)
You can implement topo sort either way, doesn't really matter. Either use BFS, "remove" edges by subtracting indegrees on vertices and add when indeg[u] = 0, or just build the DFS tree.
Hello, for the generic DFS method, should we use void or returning something?
LEGEND!!!
thank you . and I would like to see your face
Dijkstra in school??? Noway...😂😂😂
i only hear mouth sounds on this video....