Professional Documents
Culture Documents
Imp que
Imp que
Imp que
Linked list
.
1 everse the linked list.
R
2. Middle of linked list.
3. Reverse linked list in k order.
4. Check circular list.
5. Detect and Remove Loops in Sorted /Unsorted linked list.
6. Sort 0’s 1’s 2’s in linked list.
7. Merge 2 sorted linked lists.
8. Palindrome linked list.
9. Add 2 numbers using linked list.
10. Clone linked list with random pointer.
11. Merge Sort in linked list.
12. Flatten linked list.
● ax/Min Subarray of Size K.
M
● 1st negative in every window size of K
● Count occurrence of anagram
● Max of all Subarray of Size K
● Max of Min for every min size.
● Largest/Smallest Subarray of Sum K
● Largest substring of K distinct characters.
● Length of largest substring with no repeating characters
● Pick Toys
● Minimum window Substring
Tree
. Inorder traversal
1
2. Preorder traversal
3. Postorder traversal
4. Level order traversal
5. Iterative inorder , preorder and postorder
6. Maximum depth of binary tree
7. Check for balance tree
8. Diameter of binary tree
9. Maximum path sum
10. Check if two tree identical or not
11. Zigzag traversal
12. Boundary traversal
13. Vertical order traversal
14. Top view of binary tree
15. Bottom view of binary tree.
16. Right/left view of binary tree
7.
1 ymmetric Binary tree
S
18. Root to node path
19. Lowest common ancestor
20. Maximum width of binary tree
21. Children sum property
22. All nodes at distance k
23. Minimum time to burn binary tree from any node
24. Requirement to construct binary tree
25. Construct binary tree using inorder and preorder
26. Construct binary tree using inorder and postorder
27. Serialize and deserialize binary tree
28. Morris traversal
29. Flatten binary tree to linked list
BST
Graph
. Bfs Traversal
1
2. Dfs Traversal
3. Number of provinces
4. Connected component in matrix
5. Rotten oranges
6. Flood fills
7. Cycle detection in Undirected graph(Bfs)
8. Cycle detection in Undirected graph(Dfs)
9. Word Ladder-1
10. Word Ladder-2
11. Bipartite Graph(Dfs)
12. Cycle Detection in Directed Graph(Dfs)
13. Topological Sort
14. Kahn’s Algorithm
15. Cycle detection in directed Graph(Bfs)
16. Course Scheduler-1
17. Course Scheduler-2
18. Dijkstra Algorithms
19. Bellmans Ford Algo
20. Minimum spanning Tree
21. Prims Algorithms
22. Disjoint Set (by rank/size)
23. Kruskal Algorithms
24. Bridge in Graph
25. Kosaraju’s Algorithms
Recursion/Backtracking
Heap
Array
DP
. Fibonacci
1
2. Climbing Stairs
3. Frog Jump
. Frog jump with K distance
4
5. Maximum Sum of Non Adjacent Elements
6. House Robber 2
7. Ninja Training
8. Grid Unique Paths
9. Unique Path-2
10. Minimum/MaximumFalling Path Sum
11. Cherry Pickup
12. Subset Sum Equal to Target
13. Partition Equal Subset Sum
14. Partition a set into two subsets with minimum absolute sum
difference
15. Count subsets with sum K
16. Count partition with given difference
17. 0/1 Knapsacks
18. Minimum Coins
19. Target Sum
20. Coin change-2
21. Unbounded Knapsacks
22. Rod cutting problem
23. Longest common subsequences
24. Longest palindrome subsequences
25. Minimum insertion to make string palindromic
26. Minimum insertion to convert string A to string B
27. Shortest Common Supersequences
28. Distinct Subsequences
29. Edit Distances
30. WildCard Matching
31. Best Time to Buy And Sell Stock
32. Buy And Sell Stock -2
33. Buy And Sell Stock-3
34. Buy And Sell Stock-4
35. Buy And Sell Stock with Cooldown
36. Buy And Sell Stock With Transaction Fee
37. Longest Increasing Subsequences
8. Longest Divisible Subset
3
39. Longest String Chain
40. Longest Bitonic Subsequences
41. Number of Increasing (Longest) Subsequences
42. Matrix Chain Multiplication
43. Minimum Cost to cut the stick
44. Burst balloons
45. Evaluate boolean expression to true
46. Palindrome partitioning-2
47. Partition Array for Maximum Sum
48. Maximum rectangle area with all 1’s count square
submatrices with all one
Binary Search