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]
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
Topic/Article GfG Solution Leetcode
Shortest Path in UG with unit weights
Shortest Path in DAG
Djisktra’s Algorithm
Why priority Queue is used in Djisktra’s Algorithm
Shortest path in a binary maze
Path with minimum effort
Cheapest flights within k stops
Network Delay time
Number of ways to arrive at destination
Minimum steps to reach end from start by performing multiplication and mod operations with array elements
Bellman Ford Algorithm
Floyd Warshal Algorithm
Find the city with the smallest number of neighbors in a threshold distance
Step 15.5: MinimumSpanningTree/Disjoint Set and Problems
Topic/Article GfG Solution Leetcode
Minimum Spanning Tree
Prim’s Algorithm
Disjoint Set [Union by Rank]
Disjoint Set [Union by Size]
Kruskal’s Algorithm
Number of operations to make network connected
Most stones removed with same rows or columns
Accounts merge
Number of island II
Making a Large Island
Swim in rising water [HARD]
Step 15.6: Other Algorithms
Topic/Article GfG Solution Leetcode
Bridges in Graph
Articulation Point
Kosaraju’s Algorithm
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
Topic/Article GfG Solution Leetcode
Ninja’s Training (DP 7)
Grid Unique Paths : DP on Grids (DP8)
Grid Unique Paths 2 (DP 9)
Minimum path sum in Grid (DP 10)
Minimum path sum in Triangular Grid (DP 11)
Minimum/Maximum Falling Path Sum (DP-12)
3-d DP : Ninja and his friends (DP-13)
Step 16.4: DP on Subsequences
Topic/Article GfG Solution Leetcode
Subset sum equal to target (DP- 14)
Partition Equal Subset Sum (DP- 15)
Partition Set Into 2 Subsets With Min Absolute Sum Diff (DP- 16)
Count Subsets with Sum K (DP – 17)
Count Partitions with Given Difference (DP – 18)
0/1 Knapsack (DP – 19)
Minimum Coins (DP – 20)
Target Sum (DP – 21)
Coin Change 2 (DP – 22)
Unbounded Knapsack (DP – 23)
Rod Cutting Problem | (DP – 24)
Step 16.5: DP on Strings
Topic/Article GfG Solution Leetcode
Longest Common Subsequence | (DP – 25)
Print Longest Common Subsequence | (DP – 26)
Longest Common Substring | (DP – 27)
Longest Palindromic Subsequence | (DP-28)
Minimum insertions to make string palindrome | DP-29
Minimum Insertions/Deletions to Convert String | (DP- 30)
Shortest Common Supersequence | (DP – 31)
Distinct Subsequences| (DP-32)
Edit Distance | (DP-33)
Wildcard Matching | (DP-34)
Step 16.6: DP on Stocks
Topic/Article GfG Solution Leetcode
Best Time to Buy and Sell Stock |(DP-35)
Buy and Sell Stock – II|(DP-36)
Buy and Stock Sell IV |(DP-38)
Buy and Sell Stocks With Cooldown|(DP-39)
Buy and Sell Stocks With Transaction Fee|(DP-40)
Step 16.7: DP on LIS
Topic/Article GfG Solution Leetcode
Longest Increasing Subsequence |(DP-41)
Printing Longest Increasing Subsequence|(DP-42)
Longest Increasing Subsequence |(DP-43)
Largest Divisible Subset|(DP-44)
Longest String Chain|(DP-45)
Longest Bitonic Subsequence |(DP-46)
Number of Longest Increasing Subsequences|(DP-47)
Step 16.8: MCM DP | Partition DP
Topic/Article GfG Solution Leetcode
Matrix Chain Multiplication|(DP-48)
Matrix Chain Multiplication | Bottom-Up|(DP-49)
Minimum Cost to Cut the Stick|(DP-50)
Burst Balloons|(DP-51)
Evaluate Boolean Expression to True|(DP-52)
Palindrome Partitioning – II|(DP-53)
Partition Array for Maximum Sum|(DP-54)
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)