Q1. Set Matrix Zeroes (Solution)
Q2. Move Zeroes (Solution)
Q3. Best Time to Buy and Sell Stock (Solution)
Q4. Chocolate Distribution Problem (Solution)
Q5. Find the Duplicate Number (Solution)
Q6. Sort Colors (Solution)
Q7. Remove Duplicates from Sorted Array (Solution)
Q8. Two Sum (Solution)
Q9. Best Time to Buy and Sell Stock II (Solution - DP)
Q10. Subarray Sums Divisible by K (Solution - Hash Table)
Q11. Find All Duplicates in an Array (Solution)
Q12. Container With Most Water (Solution - IMP)
Q13. 3 Sum (Solution)
Q14. 4 Sum (Solution)
Q15. Maximum Points You Can Obtain from Cards (Solution)
Q16. Subarray Sum Equals K (Solution - Hash Table - IMP)
Q17. Spiral Matrix (Solution)
Q18. Word Search (Solution - DFS)
Q19. Jump Game (Solution - DP)
Q20. Merge Sorted Array (Solution - O(1) Space)
Q21. Majority Element (Solution - Voting Algorithm - O(1) Space)
Q22. Reverse Pairs (Solution - Merge Sort Application)
Q23. Print all possible combinations of r elements in a given array of size n (Solution - Backtracking)
Q24. Game of Life (Solution)
Q25. Max Value of Equation (Solution - Maths + Heap)
Q26. Insert Delete GetRandom O(1) - Duplicates allowed (Solution)
Q27. Largest Rectangle in Histogram (Solution - Stack)
Q1. Middle of the Linked List (Solution)
Q2. Linked List Cycle (Solution - Floyd Cycle Detection Algorithm)
Q3. Convert Binary Number in Linked List to Integer (Solution)
Q4. Remove Duplicates from Sorted List (Solution)
Q5. Sort a Linked List of 0s, 1s and 2s (Solution - Dummy Nodes concept - IMP)
Q6. Reverse Linked List (Solution - Recursive/Iterative)
Q7. Merge Two Sorted Lists (Solution - Dummy Node/Recursive - IMP)
Q8. Multiply Two Number represented by Linked Lists (Solution)
Q9. Intersection of Two Linked Lists (Solution)
Q10. Delete Node in a Linked List (Solution)
Q11. Palindrome Linked List (Solution)
Q12. Copy List with Random Pointer (Solution - Special Problem - IMP)
Q13. Add Two Numbers II (Solution - Stack)
Q14. Reverse Linked List II (Solution - IMP)
Q15. Remove Nth Node from End of List (Solution - One Pass solution)
Q16. Flatten a Multilevel Doubly Linked List (Solution - Recursion - V.V.V.IMP)
Q17. Partition List (Solution - Dummy Nodes concept - V.V.IMP)
Q18. Remove Duplicates from Sorted List II (Solution - V.IMP)
Q19. Linked List in Zig-Zag Fashion (Solution)
Q20. Segregate Odd and Even nodes in a Linked List (Solution - Dummy Nodes concept - IMP)
Q21. Reorder List (Solution - Dummy Node + Reversal - V.IMP)
Q22. Merge K Sorted Lists (Solution - Heap + Dummy Node concept - V.V.V.IMP)
Q23. Reverse Nodes in K Group (Solution - Recursion - V.V.IMP)
Q24. Sort List (Merge Sort) (Solution - Merge Sort in LL - V.IMP)
Q25. Flattening a Linked List (Solution)
Q1. Valid Parentheses (Solution - Stack)
Q2. Print all the Duplicates in the given string (Solution)
Q3. Implement strStr (Solution - KMP Algorithm)
Q4. Longest Common Prefix (Solution)
Q5. Valid Palindrome II (Solution)
Q6. Integer to Roman (Solution)
Q7. Generate Parentheses (Solution - Backtracking)
Q8. Simplify Path (Solution - V.V.IMP)
Q9. Smallest Window in a string containing all the characters of another string (Solution - Sliding Window + Hashing)
Q10. Reverse Words in String (Solution - In place)
Q12. Group Anagrams (Solution - Hashing)
Q1. Diameter of Binary Tree (Solution)
Q2. Invert Binary Tree (Solution)
Q3. Subtree of Another Tree (Solution)
Q4. Range Sum of BST (Solution)
Q5. Symmetric Tree (Solution)
Q6. Convert Sorted Array to Binary Search Tree (Solution - IMP)
Q7. Merge Two Binary Tree (Solution - V.V.IMP)
Q8. Maximum Depth of Binary Tree (Solution)
Q9. Binary Tree Paths (Solution)
Q10. Same Tree (Solution)
Q11. Lowest Common Ancestor of Binary Search Tree (Solution)
Q12. Path Sum (Solution)
Q13. Minimum Absolute Difference in BST (Solution)
Q14. Sum of Left Leaves (Solution - IMP)
Q15. Balanced Binary Tree (Solution - V.IMP)
Q16. Predecessor And Successor (Solution)
Q17. Binary Tree Inorder Traversal (Solution)
Q18. Check whether BST contains dead end (Solution)
Q19. Binary Search Tree Iterator (Solution - Iterative In-order Traversal)
Q20. Lowest Common Ancestor of a Binary Tree (Solution - V.V.V.IMP)
Q21. Unique Binary Search Trees II (Solution - DP + Catalan Number - V.V.V.IMP)
Q22. All nodes distance K in Binary Tree (Solution - Parent Pointer + BFS - V.V.V.IMP)
Q23. Validate Binary Search Tree (Solution - V.IMP)
Q24. Binary Tree Right Side View (Solution - BFS - V.IMP)
Q25. Redundant Connection (Solution - DSU - IMP)
Q26. Binary Tree Level Order Traversal (Solution)
Q27. Path Sum III (Solution - DFS + Hashing - V.V.IMP)
Q28. Construct Binary Tree from Preorder and Postorder Traversal (Solution - V.IMP)
Q29. Unique Binary Search Trees (Solution - DP + Catalan Number - V.V.V.IMP)
Q30. Recover Binary Search Tree (Solution - Inorder Traversal - V.IMP)
Q31. Populating Next Pointers in Each Node (Solution - V.V.IMP)
Q32. Flatten Binary Tree to Linked List (Solution - V.V.IMP)
Q33. Maximum Width of Binary Tree (Solution - BFS + Node numbering - V.V.IMP)
Q34. Minimum Distance between two nodes of Binary Tree (Solution - LCA Application)
Q35. Kth Smallest Element in a BST (Solution)
Q36. Binary Tree ZigZag Level Order Traversal (Solution - IMP)
Q37. Count BST Nodes that lie in a given range (Solution)
Q38. Preorder to Postorder (Solution)
Q39. Binary Tree to Doubly Linked List (DLL) (Solution - V.V.IMP)
Q40. Binary Tree Maximum Path Sum (Solution - Similar approach to diameter of BT - V.V.V.IMP)
Q43. Vertical Order Traversal of a Binary Tree (Solution - V.V.V.IMP)
Q44. Print K Sum Paths in Binary Tree (Solution - V.V.IMP)
Q47. Largest BST in Binary Tree (Solution - V.V.V.IMP)
Q1. BFS Traversal of Graph (Solution)
Q2. DFS Traversal of Graph (Solution)
Q3. Number of Islands (Solution - V.IMP)
Q4. Flood Fill (Solution - V.V.IMP)
Q5. Rat in a Maze problem (Solution - V.V.IMP)
Q6. Detect Cycle in an Undirected Graph (Solution - V.IMP)
Q7. Detect Cycle in a Directed Graph (Solution - V.IMP)
Q8. Steps by Knight (Solution - V.IMP)
Q9. Decode String (Solution - Recursion - IMP)
Q10. Shortest Bridge (Solution - DFS + Multisource BFS)
Q11. Number of Operations to make Network Connected (Solution - V.IMP)
Q12. Find Eventual Safe States (Solution - Topological Sort - Kahn's Algorithm - V.V.IMP)
Q13. Strongly Connected Components (Kosaraju Algorithm) (Solution - Kosaraju's Algorithm - Special Algorithm)
Q14. Time Needed to Inform all Employees (Solution - BFS - V.IMP)
Q15. Graph Coloring Problem (Bipartite Graph) (Solution - V.V.V.IMP)
Q16. Most Stones Removed with Same Row or Column (Solution)
Q17. As far as from land as possible (Solution - Reverse Multisource BFS - V.IMP)
Q18. Find the City with the Smallest number of Neighbors at a Threshold Distance (Solution - Shortest Path Algorithm - Dijkstra/Floyd/BellmanFord)
Q19. Course Schedule (Solution - Topological Sort - Kahn's Algorithm - V.V.IMP)
Q20. Minimum Spanning Tree (Solution - Prim's/Kruskal's Algorithm - V.V.V.IMP)
Q21. Floyd Warshall Algorithm (Solution - All Pair Shortest Path Algorithm)
Q22. Evaluate Division (Solution - Application of Graph - DFS)
Q23. Snakes and Ladder (Solution - BFS - V.V.V.IMP)
Q24. Topological Sort (Solution - Kahn's Algorithm/DFS - V.V.IMP)
Q25. Cheapest Flights Within K Stops (Solution - Application of Bellman Ford Algorithm)
Q26. Negative Weight Cycle (Solution - Application of Bellman Ford Algorithm - V.IMP)
Q27. Bipartite Graph (Solution - Graph Coloring)