Top 5 Most Common Graph Algorithms for Coding Interviews

preview_player
Показать описание


0:00 - Intro
0:10 - 1. DFS
2:40 - 2. BFS
4:55 - 3. Union-Find
6:45 - 4. Topological Sort
8:47 - 5. Dijkstra's Algo
12:00 - Extra Graph Algorithms

#common #graph #algorithm

Disclosure: Some of the links above may be affiliate links, from which I may earn a small commission.
Рекомендации по теме
Комментарии
Автор

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

ishandeshpande
Автор

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

shreddingstuff
Автор

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.

amirnasser
Автор

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)

juda
Автор

Ur playlist is the reason I feel confident with Graph questions. Thanks Man!!

UnspokenThings
Автор

i think it’s pronounced dye-kstras algorithm btw

runfunmc
Автор

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!

ChristopherLoverich
Автор

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.

ramvenkatachalam
Автор

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

gamerclips
Автор

Its really helpful that you categorize every problem and made a separate folder

tahichy
Автор

It's a remainder that you are doing amazing 😁👍🏻

mohithadiyal
Автор

Just fyi, the Di in Dijkstra is pronounced like Di in Dice

Thanks for the video

yang
Автор

One of the best interview preparation channel

praveenmishra
Автор

7:33 isn't topological sort actually identical to BFS?

krige
Автор

Why isn't Top Sort BFS since it looks like you are doing level order traversal?

abdoulbarry
Автор

Because of your content..I feel confident while giving interview...huge respect❤

heen
Автор

Shouldnt topological sort use bfs? Since we would have to print all nodes that are at the same level or depth before going further?

anonymoussloth
Автор

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

axd
Автор

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?

amitvyas
Автор

What about Bellman Ford or Floyd Warshall Algo

edgarcamelo