Skip to content
Sabaqاردو

Graph Series by Striver (take U forward)

By take U forward

Course audio
Course audio: English
Level
Advanced
Length
15 lessons

What you'll be able to do

  • Represent graphs with adjacency lists and matrices
  • Apply BFS and DFS to grid and component problems
  • Detect cycles in undirected graphs

About this course

Raj Vikramaditya (Striver) of take U forward teaches graph algorithms for coding interviews, with code in both C++ and Java. The series covers what graphs are and their types, representation in C++ and Java, connected components, breadth-first and depth-first search, and problems such as number of provinces, number of islands, flood fill, rotten oranges, cycle detection with BFS and DFS, nearest-cell distance, surrounded regions and enclaves, going on to shortest paths and spanning trees. It suits interview candidates who know basic DSA.

Before you start: Comfort with C++ or Java, recursion, and basic data structures.

Syllabus

Sabaq lists the first 15 videos of this playlist; the rest continue on YouTube. Full playlist on YouTube

  1. 1G-1. Introduction to Graph | Types | Different Conventions Used
  2. 2G-2. Graph Representation in C++ | Two Ways to Represent
  3. 3G-3. Graph Representation in Java | Two Ways to Represent
  4. 4G-4. What are Connected Components ?
  5. 5G-5. Breadth-First Search (BFS) | C++ and Java | Traversal Technique in Graphs
  6. 6G-6. Depth-First Search (DFS) | C++ and Java | Traversal Technique in Graphs
  7. 7G-7. Number of Provinces | C++ | Java | Connected Components
  8. 8G-8. Number of Islands | Number of Connected Components in Matrix | C++ | Java
  9. 9G-9. Flood Fill Algorithm | C++ | Java
  10. 10G-10. Rotten Oranges | C++ | Java
  11. 11G-11. Detect a Cycle in an Undirected Graph using BFS | C++ | Java
  12. 12G-12. Detect a Cycle in an Undirected Graph using DFS | C++ | Java
  13. 13G-13. Distance of nearest cell having 1 | 0/1 Matrix | C++ | Java
  14. 14G-14. Surrounded Regions | Replace O's with X's | C++ | Java
  15. 15G-15. Number of Enclaves | Multi-source BFS | C++ | Java

What to take next

Videos by take U forward, played from their official YouTube channel. Subscribe on YouTube

Official upload by the teacher or institution on their own channel, shown with YouTube's embedded player.

Sabaq lists the first 15 videos of this playlist; the rest continue on YouTube. Full playlist on YouTube

Lessons last checked Oct 2026. Course summary and lesson structure by Sabaq.

Report a problem or a rights request