Skip to main content
CourseFlix

Graph Theory Algorithms for Competitive Programming

20h 12m 42s
English
Paid

Graph algorithms show up in many parts of coding work. You see them in maps, social apps, and build tools. You also see them in many contest tasks. This course helps you learn these ideas with clear steps and hands-on practice. You work with C++ as you learn.

You will see how common tools use graphs. These tools include map apps, social networks, image tasks, and routing systems. You also learn how to apply the same ideas to contest problems.

The course gives you guided lessons and coding tasks. You also get more than 80 problems to try. Each problem helps you check what you learned and build skill through practice.

The course is taught by Prateek Narang and Apaar Kamal. They are software engineers at Google and have taught many students for years. The videos use clear words and simple steps. They mix theory with code so you can follow along and build each idea with confidence.

Course Overview

You start with the basics. You learn how to store a graph in code and how to explore it. Then you move to common tasks like finding paths, checking cycles, and working with tree data. The course has two main parts.

Part I: Core Concepts

  • Graph storage and formats

  • BFS and DFS

  • Cycle checks in weighted and unweighted graphs

  • Topological order and DAGs

  • Disjoint Set Union, path compression, union by rank

  • Minimum Spanning Trees with Prim and Kruskal

  • Shortest paths with BFS, Dijkstra, Bellman-Ford, and Floyd-Warshall

  • Travelling Salesman and the min-cost Hamiltonian cycle

Part II: Advanced Topics

  • Flood fill

  • Multisource BFS

  • DFS backedges

  • SCCs and Kosaraju

  • Euler tour

  • Lowest Common Ancestor

  • Trees

  • Articulation points and bridges

  • Network flow

Part II is best for students who want to take part in contests or solve harder graph tasks. If you want a strong base for everyday coding work, Part I may be enough.

About the Author: udemy

udemy thumbnail

Udemy is a global online marketplace for teaching and learning. It connects students with instructors who share skills in many fields.

Who Uses Udemy

Millions of learners use Udemy to gain skills for work and personal growth. Companies, governments, and nonprofits also use Udemy to train their teams.

What Udemy Offers

Udemy provides a curated set of business and technical courses. These courses help teams build practical skills and support ongoing learning at work.

Watch Online 94 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 94 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Course Orientation!
All Course Lessons (94)
#Lesson TitleDurationAccess
1
Course Orientation! Demo
07:03
2
Graphs Introduction
12:05
3
Graph Applications
05:49
4
Graph Key Terms
09:08
5
Adjacency List Representation
08:43
6
Adjacency List Representation with Node Class
09:09
7
Breadth First Search
06:44
8
BFS Code
07:16
9
BFS Shortest Path
04:31
10
BFS Shortest Path Code
06:11
11
Snakes and Ladder Solution
08:25
12
DFS Concept
04:19
13
DFS Code
05:41
14
Largest Island Solution
12:31
15
Cycle Detection in Undirected Graph
03:35
16
Cycle Detection in Undirected Graph Code
08:59
17
Directed Graph - Cycle Detection
08:56
18
Directed Graph - Cycle Detection Code
12:47
19
Bipartite Graph
07:15
20
Bipartite Graph Code
12:26
21
Directed Acyclic Graph & Topological Ordering
04:35
22
Topological Sort Algorithm
04:51
23
Topological Ordering BFS Code
05:56
24
Toplogical Order using DFS
04:52
25
Topological Ordering using DFS Code
05:07
26
Disjoint Set Union Introduction
04:20
27
DSU Data Structure - Union & Find Ops
09:02
28
DSU Data Structure
07:07
29
DSU Implementation
13:17
30
Union by Rank
10:16
31
Path Compression Optimisation
08:39
32
DSU Dry Run
13:15
33
Introduction to Minimum Spanning Trees!
03:38
34
Prim's Algorithm
19:33
35
Prim's Code
18:43
36
Kruskal's Algorithm
08:59
37
Kruskal's Code
13:38
38
Introduction to Shortest Path Algorithms
07:53
39
Dijkshtra's Algorithm
09:12
40
Dijkshtra's Algorithm Code
14:55
41
Bellman Ford Algorithm
33:09
42
Bellman Ford Code
09:12
43
Floyd Warshall
29:35
44
Floyd Warshall Code
08:38
45
Solution - Shortest Path in Grid!
12:21
46
Travelling Salesman Problem
12:04
47
Travelling Salesman Intution
03:43
48
TSP Brute Force
12:26
49
TSP DP + Bitmasking
02:44
50
Flood Fill Introduction
05:32
51
Number of Islands
18:19
52
Coloring Islands
07:01
53
Biggest Island
03:30
54
Make Largest island
19:01
55
Introduction to Multi Source BFS
12:12
56
Problem on Multi Source BFS
19:46
57
Bonus Problem on Multi Source BFS
15:51
58
0/1 BFS
07:41
59
Introduction to DFS tree and Backedges
09:07
60
DFS Tree and backedges in Undirected graph
16:41
61
DFS Tree and Backedges in Directed and Undirectde graphs
23:12
62
Print cycle in a graph
10:04
63
Introduction and definitions
12:27
64
Discovered Time
11:33
65
Lowest Time or Low Link
24:48
66
Algorithm
19:20
67
Coding the Algorithm
17:18
68
Introduction to Topological Order and Strongly Connected Components
18:42
69
Algorithm and Code to find Topological Ordering
20:43
70
Introduction to Strongly Connected Component
09:51
71
Condensed Component Graph
12:51
72
Kosaraju Algorithm for Strongly Connected Component
30:06
73
Kosaraju Algorithm for Strongly Connected Component Code
11:47
74
Introduction and properties of trees
24:27
75
DFS on trees
08:03
76
Print all ancestors in a tree
08:36
77
Introduction
11:24
78
Applications
21:51
79
Code
13:04
80
Introduction
12:37
81
LCA (Brute Force)
16:12
82
LCA using Binary Lifting
38:43
83
Introduction and brute force
15:52
84
Approach to re root the tree
20:21
85
Code for re rooting of the tree
11:13
86
Introduction to Network
04:13
87
Introduction to Maximum Flow in a Network
08:40
88
Residual Networks and Augmenting Paths
26:27
89
Ford-Fulkerson and Edmond-Karp Algorithm
26:24
90
Dinic's Algorithm
25:19
91
Dinic's Algorithm Code
33:21
92
Applications of Max Flow as Maximum Bipartite Matching
23:36
93
Board Game
12:12
94
Board Game Code
19:31
Unlock unlimited learning

Get instant access to all 93 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription