Learn Graphs in 10 Days
Learn Graphs in 10 Days
Graphs
in 10 Days
15
1 4
30
5 50 5 15
5
2 3
15
Topics
Practice Questions
www.bosscoderacademy.com 1
Interview Questions
(, How would you implement a graph in Python/Java/C++!
, What are the pros and cons of using an adjacency list versus
an adjacency matrix?
www.bosscoderacademy.com 2
Day 2
Graph Traversal - BFS and DFS
Topics
Practice Questions
Interview Questions
} How does BFS differ from DFS in terms of implementation and
application?
x} Can you detect cycles in a directed graph using DFS?
www.bosscoderacademy.com 3
www.bosscoderacademy.com 4
Day 3
Shortest Paths in Unweighted
Graphs
Topics
J Shortest Path Using BFS: Techniques for finding the
shortest path in unweighted graphs.(see Image 1)
Practice Questions
Interview Questions
{ Describe an algorithm to find the shortest path in an
unweighted graph.
x{ How can you modify BFS to track the actual path between two
nodes?
www.bosscoderacademy.com 5
www.bosscoderacademy.com 6
Day 4
Shortest Paths in Weighted
Graphs - Dijkstra's Algorithm
Topics
L Dijkstra's Algorithm: A greedy algorithm for finding
the shortest paths from a source vertex to all other
vertices in a graph with non-negative weights.(see
Image 1)
Practice Questions
Interview Questions
Explain Dijkstra's algorithm and how a priority queue is used.
How does Dijkstra's algorithm ensure the shortest path is
found?
www.bosscoderacademy.com 7
www.bosscoderacademy.com 8
Day 5
Cycle Detection
Topics
Practice Questions
Interview Questions
x How do you detect a cycle in an undirected graph?
r Describe a method to detect cycles in directed graphs.
www.bosscoderacademy.com 9
www.bosscoderacademy.com 10
Day 6
Minimum Spanning Tree (MST)
Topics
Practice Questions
Interview Questions
y What is the minimum spanning tree and why is it important?
Compare and contrast Prim’s and Kruskal’s algorithms.
www.bosscoderacademy.com 11
www.bosscoderacademy.com 12
Day 7
Graph Connectivity
Topics
Practice Questions
Interview Questions
~ Explain how to find connected components in an undirected
graph.
What are strongly connected components, and how can they
be identified?
www.bosscoderacademy.com 13
www.bosscoderacademy.com 14
Day 8
Advanced Algorithms - Network
Flow
Topics
Practice Questions
Interview Questions
Describe the maximum flow problem and its applications.
Explain the Ford-Fulkerson algorithm and how it determines
augmenting paths.
www.bosscoderacademy.com 15
www.bosscoderacademy.com 16
Day 9
Advanced Graph Algorithms
Topics
P Bellman-Ford Algorithm: Handles shortest paths in
graphs with negative weights.(see Image 1)
P Floyd-Warshall Algorithm: Computes shortest paths
between all pairs of vertices.(see Image 2)
Practice Questions
Interview Questions
¯´ How does the Bellman-Ford algorithm handle negative weight
edges?Á
«´ Describe the Floyd-Warshall algorithm and its use cases.
www.bosscoderacademy.com 17
www.bosscoderacademy.com 18
Day 10
Review and Advanced Practice
Topics
Practice Questions
Interview Questions
MS Given a complex problem description, identify which graph
algorithms to apply and describe your approach.U
DS Discuss a time when you used graph theory to solve a
real-world problem.
www.bosscoderacademy.com 19
CONCLUSION:
www.bosscoderacademy.com 20
Why
Bosscoder?
750+ Alumni placed at Top
Product-based companies.
Explore More