Compile Ready
DSA
DSA/Graph Algorithms

Graph Algorithms

A premium, interview-focused graph course. Every problem teaches the pattern first, then the algorithm, then a clean Java 17 implementation — with dry runs and interview guidance. You will progress from modelling a grid as a graph all the way to advanced techniques like union-find, Dijkstra, and articulation points.

25

Curated lessons

10

Learning modules

9h 38m

Est. study time

11

Target companies

What you'll learn

  • Model grids, matrices, and relationships as graphs and traverse them with DFS and BFS.
  • Choose the right shortest-path tool for the edge weights: BFS, Dijkstra, or Bellman-Ford.
  • Apply union-find with path compression for near-constant-time grouping and cycle detection.
  • Recognise topological-sort, bipartite, and advanced-graph patterns under interview pressure.

Your progress

0%

0 / 25

problems completed

25 available now · keep going!

Mark lessons complete as you work through them. Progress is saved on this device and syncs to your account when you sign in.

Learning roadmap

Work top to bottom — each module builds on the last.

  1. 1

    Graph Traversal

    DFS / BFS over grids and adjacency lists

    The foundation: model a grid or adjacency list as a graph and visit every node exactly once with DFS or BFS.

    5/5 problems1h 27m
  2. 2

    Connected Components

    Component counting with DFS or Union-Find

    Count and group nodes that are reachable from one another — the first place Union-Find competes with DFS/BFS.

    3/3 problems1h 3m
  3. 3

    Cycle Detection

    Cycle detection via Union-Find / DFS parent tracking

    Decide whether an undirected graph contains a cycle — the core check behind trees, forests, and safe merges.

    2/2 problems35m
  4. 4

    Topological Sort

    Kahn's BFS / DFS topological ordering

    Order the nodes of a DAG so every edge points forward — the dependency-resolution pattern interviewers love.

    4/4 problems1h 35m
  5. 5

    Union Find

    Disjoint Set Union (path compression + union by rank)

    Disjoint Set Union with path compression and union by rank — near-constant-time grouping and equivalence.

    3/3 problems1h 3m
  6. 6

    Shortest Path

    BFS / Dijkstra / Bellman-Ford shortest paths

    From unweighted BFS to Dijkstra and Bellman-Ford — pick the right shortest-path tool for the edge weights.

    4/4 problems1h 59m
  7. 7

    Minimum Spanning Tree

    Minimum Spanning Tree (Prim / Kruskal)

    Connect every node at minimum total cost with Prim's or Kruskal's algorithm.

    1/1 problems30m
  8. 8

    Grid Graphs

    Multi-source BFS on grids

    Multi-source BFS on a grid — spreading fronts, distances, and simultaneous starts.

    1/1 problems22m
  9. 9

    Bipartite Graph

    2-colouring with BFS / DFS

    Two-colour a graph to prove it has no odd cycle — conflict-free partitioning.

    1/1 problems24m
  10. 10

    Advanced Graphs

    Tarjan's bridges (DFS discovery + low-link)

    Tarjan's bridges and articulation points — the discovery-time / low-link technique for critical edges.

    1/1 problems40m

Modules

10 themed modules from fundamentals to advanced.

Full curriculum

25 problems and 0 concept lessons in learning order.

Techniques you'll master

BFSBellman-FordBinary SearchBridgeColoringCombinatoricsDFSDSUDijkstraGeometryGraphHash TableHeapLow LinkMatrixMinimum Spanning TreeQueueShortest PathSimulationSortingStringTarjanTopological SortUnion Find