- dfs
- bfs
- Cycle detection in undirected graph:
- using dfs
- using bfs
- Cycle detection in directed graph:
- using dfs
- using bfs
- Topological sort:
- using dfs
- using bfs
- Djikstra's algo for sortest path from source to all node
- Prim's algo for MST
- Kruskal's algo for MST
- Bridge in graph / Critical connection
- Articulation point (Tarjan's Algo) -related to bridge in graph-
- Bellman ford algorithm for sortest path from source to all node also include negative edges => find negative cycle in graph
- kosaraju's algorithm to find strongly connected component => discovered by all nodes to all nodes
- Inorder, Postorder, Preorder traversal
- left view, top view, bottom view of tree
- vertical order traversal
- Morris Inorder and preorder traversal takes O(1) space complexity for traversal
- Level order traversal
- Boundary traversal of tree
- Binary Tree Maximum Path Sum ... To be continued
- Balanced parantheses
- Next greater element
- Largest rectangle in histogram
- Sliding Window Maximum
- Max heap, Min Heap implementation (Hard)
- kth largest element
- k most frequent element
- Merge k sorted array
- Find median of from data stream
- maximum sum combination
- Sliding Window maximum
- N meetings in a room
- Minimum num of platform required
- job sequencing problem
- Activity selection
- minimum number of coins
- LRU cache
Types of DP questions:
- 0/1 knapsack =>
- Subset sum
- equal sum partition
- count of subset sum
- minimum subset sum diff
- target sum
- number of subset of given difference
- unbounded knapsack
- rod cutting
- coin change
- coin change 2
- maximum ribbon cut {not imp}
- Fibonacees
- LCS
- longest common substring
- print lcs
- shortest common supersequence
- print SCS
- minimum number of insertion and deletion to make a from b string
- largest repeating subsequence
- length of largest subsequence of a which is a substring is b
- subsequnce pattern matching
- largest palindromic subsequence
- largest palindromic substring
- count of palindromic substring
- min number of deletion/ insertion to make string a from b
- LIS
- Kadane's Algo
- Matrix chain multiplication
- DP on tree
- dp on grid
- others