Step 15: Graphs [Concepts & Problems]
- The new Graph playlist is under progress, you can check here -> Link
- In case you have lesser time, you can check the old graph series here -> Link
Step 15.1: Learning
Topic/Article | GfG | Solution | Leetcode | |
---|---|---|---|---|
Graph and Types | ![]() |
|||
Graph Representation | C++ |
![]() |
![]() |
||
Graph Representation | Java |
![]() |
![]() |
||
Connected Components | Logic Explanation |
![]() |
![]() |
||
BFS |
![]() |
![]() |
||
DFS |
![]() |
![]() |
Step 15.2: Problems on BFS/DFS
Topic/Article | GfG | Solution | Leetcode | |
---|---|---|---|---|
Number of provinces (leetcode) |
![]() |
![]() |
![]() |
|
Connected Components Problem in Matrix |
![]() |
|||
Rotten Oranges |
![]() |
![]() |
![]() |
|
Flood fill |
![]() |
![]() |
![]() |
|
Cycle Detection in unirected Graph (bfs) |
![]() |
![]() |
||
Cycle Detection in undirected Graph (dfs) |
![]() |
![]() |
||
0/1 Matrix (Bfs Problem) |
![]() |
![]() |
||
Surrounded Regions (dfs) |
![]() |
![]() |
||
Number of Enclaves [flood fill implementation – multisource] |
![]() |
![]() |
||
Word ladder – 1 |
![]() |
![]() |
||
Word ladder – 2 |
![]() |
![]() |
||
Number of Distinct Islands [dfs multisource] |
![]() |
![]() |
||
Bipartite Graph (DFS) |
![]() |
![]() |
||
Cycle Detection in Directed Graph (DFS) |
![]() |
![]() |
Step 15.3: Topo Sort and Problems
Topic/Article | GfG | Solution | Leetcode | |
---|---|---|---|---|
Topo Sort |
![]() |
|||
Kahn’s Algorithm |
![]() |
|||
Cycle Detection in Directed Graph (BFS) |
![]() |
|||
Course Schedule – I |
![]() |
![]() |
||
Course Schedule – II |
![]() |
![]() |
||
Find eventual safe states |
![]() |
![]() |
||
Alien dictionary |
![]() |
![]() |
Step 15.4: Shortest Path Algorithms and Problems
Step 15.5: MinimumSpanningTree/Disjoint Set and Problems
Step 16: Dynamic Programming [Patterns and Problems]
Step 16.1: Introduction to DP
Topic/Article | GfG | Solution | Leetcode | |
---|---|---|---|---|
Dynamic Programming Introduction | ![]() |
Step 16.2: 1D DP
Topic/Article | GfG | Solution | Leetcode | |
---|---|---|---|---|
Climbing Stars | ![]() |
![]() |
![]() |
|
Frog Jump(DP-3) | ![]() |
|||
Frog Jump with k distances(DP-4) | ![]() |
|||
Maximum sum of non-adjacent elements (DP 5) | ![]() |
![]() |
||
House Robber (DP 6) | ![]() |
![]() |
Step 16.3: 2D/3D DP and DP on Grids
Step 16.4: DP on Subsequences
Step 16.5: DP on Strings
Step 16.6: DP on Stocks
Step 16.7: DP on LIS
Step 16.8: MCM DP | Partition DP
Step 16.9: DP on Squares
Topic/Article | GfG | Solution | Leetcode | |
---|---|---|---|---|
Maximum Rectangle Area with all 1’s|(DP-55) | ![]() |
![]() |
![]() |
|
Count Square Submatrices with All Ones|(DP-56) | ![]() |
![]() |