Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiranpalsingh1806/awesome-leetcode
A curated list of awesome Leetcode problems, algorithms and data structures.
https://github.com/kiranpalsingh1806/awesome-leetcode
List: awesome-leetcode
algorithm awesome-leetcode awesome-list data-structure-and-algorithm data-structures dsa dsa-algorithm interview-preparation leetcode leetcode-solutions
Last synced: 16 days ago
JSON representation
A curated list of awesome Leetcode problems, algorithms and data structures.
- Host: GitHub
- URL: https://github.com/kiranpalsingh1806/awesome-leetcode
- Owner: kiranpalsingh1806
- Created: 2022-02-03T11:44:33.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-27T10:24:20.000Z (about 2 months ago)
- Last Synced: 2024-11-26T04:03:29.740Z (25 days ago)
- Topics: algorithm, awesome-leetcode, awesome-list, data-structure-and-algorithm, data-structures, dsa, dsa-algorithm, interview-preparation, leetcode, leetcode-solutions
- Homepage:
- Size: 244 KB
- Stars: 147
- Watchers: 2
- Forks: 23
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- ultimate-awesome - awesome-leetcode - A curated list of awesome Leetcode problems, algorithms and data structures. (Other Lists / Monkey C Lists)
README
- [1. Backtracking](#1-backtracking)
- [2. Base Conversion](#2-base-conversion)
- [3. Bellman Ford](#3-bellman-ford)
- [4. BFS](#4-bfs)
- [5. Binary Search](#5-binary-search)
- [6. Binary Trees](#6-binary-trees)
- [7. Bit Manipulation](#7-bit-manipulation)
- [8. Bitmasks](#8-bitmasks)
- [9. Count Pairs In Array](#9-count-pairs-in-array)
- [10. Custom Comparator](#10-custom-comparator)
- [11. Design and Implementation](#11-design-and-implementation)
- [12. DFS](#12-dfs)
- [13. Dijkstra](#13-dijkstra)
- [14. Dynamic Programming](#14-dynamic-programming)
- [15. Euler Circuit](#15-euler-circuit)
- [16. Fenwick Tree](#16-fenwick-tree)
- [17. Greedy Scheduling](#17-greedy-scheduling)
- [18. Heaps (Priority Queues)](#18-heaps-priority-queues)
- [19. Intervals](#19-intervals)
- [20. Line Sweep](#20-line-sweep)
- [21. Linked List](#21-linked-list)
- [22. LIS](#22-lis)
- [23. Manacher](#23-manacher)
- [24. Matrix](#24-matrix)
- [25. Merge Sort](#25-merge-sort)
- [26. Minimum Spanning Trees](#26-minimum-spanning-trees)
- [27. Prefix State Map](#27-prefix-state-map)
- [28. Queries](#28-queries)
- [29. Rolling Hash](#29-rolling-hash)
- [30. Segment Tree](#30-segment-tree)
- [31. Sets](#31-sets)
- [32. Sieve of Eratosthenes](#32-sieve-of-eratosthenes)
- [33. Sliding Window](#33-sliding-window)
- [34. Stack](#34-stack)
- [35. Stringstream](#35-stringstream)
- [36. Sum of First N Natural Numbers](#36-sum-of-first-n-natural-numbers)
- [37. Topological Sort](#37-topological-sort)
- [38. Trie](#38-trie)
- [39. Two Dimensional Plane](#39-two-dimensional-plane)
- [40. Two Pointer](#40-two-pointer)
- [41. Union Find](#41-union-find)## 1. Backtracking
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Generate Parentheses](https://leetcode.com/problems/generate-parentheses/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 2 | [Combination Sum](https://leetcode.com/problems/combination-sum/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 3 | [Permutations](https://leetcode.com/problems/permutations/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 4 | [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 5 | [Generate Parentheses](https://leetcode.com/problems/generate-parentheses/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 6 | [Sudoku Solver](https://leetcode.com/problems/sudoku-solver/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 7 | [Combination Sum II](https://leetcode.com/problems/combination-sum-ii/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 8 | [Permutations II](https://leetcode.com/problems/permutations-ii/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 9 | [N Queens](https://leetcode.com/problems/n-queens/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 10 | [Combinations](https://leetcode.com/problems/combinations/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 11 | [Subsets](https://leetcode.com/problems/subsets/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 12 | [Word Search](https://leetcode.com/problems/word-search/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 13 | [Subsets II](https://leetcode.com/problems/subsets-ii/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 14 | [Palindrome Partitioning](https://leetcode.com/problems/palindrome-partitioning/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 15 | [Combination Sum III ](https://leetcode.com/problems/combination-sum-iii/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |## 2. Base Conversion
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------- | ---------- | ----------------------------------------- |
| 1 | [Find Unique Binary String](https://leetcode.com/problems/find-unique-binary-string/description/) | Medium | [Solution](/solutions/base-conversion.md) |## 3. Bellman Ford
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------- |
| 1 | [Cheapest Flights Within K Stops](https://leetcode.com/problems/cheapest-flights-within-k-stops/) | Medium | [Solution](/solutions/bellman-ford.md) |
| 2 | [Network Delay Time](https://leetcode.com/problems/network-delay-time/) | Medium | [Solution](/solutions/bellman-ford.md) |## 4. BFS
| S.No | Problem | Difficulty | Solution |
| ---- | --------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Average of Levels In Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/) | Easy | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 2 | [Number of Islands](https://leetcode.com/problems/number-of-islands/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |## 5. Binary Search
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Search In Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 2 | [Find First and Last Position of Element In Sorted Array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 3 | [Minimize Maximum of Array](https://leetcode.com/problems/minimize-maximum-of-array/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |## 6. Binary Trees
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------- |
| 1 | [Sum of Leaft Leaves](https://leetcode.com/problems/sum-of-left-leaves/) | Easy | [Solution](/solutions/binary-trees.md) |
| 2 | [Construct String From Binary Tree](https://leetcode.com/problems/construct-string-from-binary-tree/) | Easy | [Solution](/solutions/binary-trees.md) |
| 3 | [Average of Levels In Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/) | Easy | [Solution](/solutions/binary-trees.md) |
| 4 | [Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/) | Easy | [Solution](/solutions/binary-trees.md) |
| 5 | [Convert Sorted Array To Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/) | Easy | [Solution](/solutions/binary-trees.md) |
| 6 | [Sum Root To Leaf Numbers](https://leetcode.com/problems/sum-root-to-leaf-numbers/) | Medium | [Solution](/solutions/binary-trees.md) |
| 7 | [Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/) | Medium | [Solution](/solutions/binary-trees.md) |
| 8 | [Lowest Common Ancestor Of A Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/) | Medium | [Solution](/solutions/binary-trees.md) |
| 9 | [Serialize and Deserialize BST](https://leetcode.com/problems/serialize-and-deserialize-bst/) | Medium | [Solution](/solutions/binary-trees.md) |
| 10 | [Construct Binary Tree From Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/) | Medium | [Solution](/solutions/binary-trees.md) |
| 11 | [Construct Binary Tree From Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/) | Medium | [Solution](/solutions/binary-trees.md) |
| 12 | [Binary Tree Pruning](https://leetcode.com/problems/binary-tree-pruning/) | Medium | [Solution](/solutions/binary-trees.md) |
| 13 | [All Nodes Distance K In Binary Tree](https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/) | Medium | [Solution](/solutions/binary-trees.md) |
| 14 | [Distribute Coins In Binary Tree](https://leetcode.com/problems/distribute-coins-in-binary-tree/) | Medium | [Solution](/solutions/binary-trees.md) |
| 15 | [Vertical Order Traversal of A Binary Tree](https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree/) | Hard | [Solution](/solutions/binary-trees.md) |## 7. Bit Manipulation
| S.No | Problem | Difficulty | Solution |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------ |
| 1 | [Power of Two](https://leetcode.com/problems/power-of-two/) | Easy | [Solution](/solutions/bit-manipulation.md) |
| 2 | [Divide Array Into Equal Pairs](https://leetcode.com/problems/divide-array-into-equal-pairs/) | Easy | [Solution](/solutions/bit-manipulation.md) |
| 3 | [Divide Two Integers](https://leetcode.com/problems/divide-two-integers/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 4 | [Subsets](https://leetcode.com/problems/subsets/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 5 | [Subsets II](https://leetcode.com/problems/subsets-ii/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 6 | [Check If A String Contains All Binary Codes of Size K](https://leetcode.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 7 | [Concatenation of Consecutive Binary Numbers](https://leetcode.com/problems/concatenation-of-consecutive-binary-numbers/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 8 | [Count Number of Maximum Bitwise OR Subsets](https://leetcode.com/problems/count-number-of-maximum-bitwise-or-subsets/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 9 | [Largest Combination With Bitwise AND Greater Than Zero](https://leetcode.com/problems/largest-combination-with-bitwise-and-greater-than-zero/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 10 | [Maximum XOR After Operations](https://leetcode.com/problems/maximum-xor-after-operations/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 11 | [Smallest Subarrays With Maximum Bitwise OR](https://leetcode.com/problems/smallest-subarrays-with-maximum-bitwise-or/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 12 | [Longest Subarray With Maximum Bitwise AND](https://leetcode.com/problems/longest-subarray-with-maximum-bitwise-and/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 13 | [Minimize XOR](https://leetcode.com/problems/minimize-xor/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 14 | [Bitwise XOR of All Pairings](https://leetcode.com/problems/bitwise-xor-of-all-pairings/) | Medium | [Solution](/solutions/bit-manipulation.md) |
| 15 | [Closest Subsequence Sum](https://leetcode.com/problems/closest-subsequence-sum/) | Hard | [Solution](/solutions/bit-manipulation.md) |
| 16 | [Find The Shortest Superstring](https://leetcode.com/problems/find-the-shortest-superstring/) | Hard | [Solution](/solutions/bit-manipulation.md) |
| 17 | [Number of One Bits](https://leetcode.com/problems/number-of-1-bits/) | Easy | [Solution](/solutions/bit-manipulation.md) |## 8. Bitmasks
| S.No | Problem | Difficulty | Solution |
| ---- | ----------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Fair Distribution of Cookies](https://leetcode.com/problems/fair-distribution-of-cookies/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 2 | [Count Number of Maximum Bitwise OR Subsets](https://leetcode.com/problems/count-number-of-maximum-bitwise-or-subsets/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |## 9. Count Pairs In Array
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Count Nice Pairs In An Array](https://leetcode.com/problems/count-nice-pairs-in-an-array/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 2 | [Count Number of Bad Pairs](https://leetcode.com/problems/count-number-of-bad-pairs/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |## 10. Custom Comparator
| S.No | Problem | Difficulty | Solution |
| ---- | ----------------------------------------------------------------------------------------- | ---------- | ------------------------------------------- |
| 1 | [Sort The People](https://leetcode.com/problems/sort-the-people/) | Medium | [Solution](/solutions/custom-comparator.md) |
| 2 | [Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/) | Medium | [Solution](/solutions/custom-comparator.md) |
| 3 | [Bitwise XOR of All Pairings](https://leetcode.com/problems/bitwise-xor-of-all-pairings/) | Medium | [Solution](/solutions/custom-comparator.md) |## 11. Design and Implementation
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------- | ---------- | -------------------------------- |
| 1 | [Implement Queue Using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) | Easy | [Solution](/solutions/design.md) |
| 2 | [Implement Stack Using Queues](https://leetcode.com/problems/implement-stack-using-queues/) | Easy | [Solution](/solutions/design.md) |
| 3 | [Stock Price Fluctuation](https://leetcode.com/problems/stock-price-fluctuation/) | Medium | [Solution](/solutions/design.md) |
| 4 | [Design Circular Deque](https://leetcode.com/problems/design-circular-deque/) | Medium | [Solution](/solutions/design.md) |
| 5 | [LRU Cache](https://leetcode.com/problems/lru-cache/) | Medium | [Solution](/solutions/design.md) |
| 6 | [Time Based Key Value Store](https://leetcode.com/problems/time-based-key-value-store/) | Medium | [Solution](/solutions/design.md) |
| 7 | [Operations On Tree](https://leetcode.com/problems/operations-on-tree/) | Medium | [Solution](/solutions/design.md) |
| 8 | [Design Circular Queue](https://leetcode.com/problems/design-circular-queue/) | Medium | [Solution](/solutions/design.md) |
| 9 | [Design Movie Rental System](https://leetcode.com/problems/design-movie-rental-system/) | Hard | [Solution](/solutions/design.md) |
| 10 | [Design A Text Editor](https://leetcode.com/problems/design-a-text-editor/) | Hard | [Solution](/solutions/design.md) |## 12. DFS
| S.No | Problem | Difficulty | Solution |
| ---- | --------------------------------------------------------------------------------------------------------------------------------- | ---------- | ----------------------------- |
| 1 | [Flood Fill](https://leetcode.com/problems/flood-fill/) | Easy | [Solution](/solutions/dfs.md) |
| 2 | [Is Graph Bipartite?](https://leetcode.com/problems/is-graph-bipartite/) | Medium | [Solution](/solutions/dfs.md) |
| 3 | [Keys and Rooms](https://leetcode.com/problems/keys-and-rooms/) | Medium | [Solution](/solutions/dfs.md) |
| 4 | [Out of Boundary Paths](https://leetcode.com/problems/out-of-boundary-paths/) | Medium | [Solution](/solutions/dfs.md) |
| 5 | [Number of Provinces](https://leetcode.com/problems/number-of-provinces/) | Medium | [Solution](/solutions/dfs.md) |
| 6 | [Pacific Atlantic Water Flow](https://leetcode.com/problems/pacific-atlantic-water-flow/) | Medium | [Solution](/solutions/dfs.md) |
| 7 | [Interleaving String](https://leetcode.com/problems/interleaving-string/) | Medium | [Solution](/solutions/dfs.md) |
| 8 | [Shortest Bridge](https://leetcode.com/problems/shortest-bridge/) | Medium | [Solution](/solutions/dfs.md) |
| 9 | [Throne Inheritance](https://leetcode.com/problems/throne-inheritance/) | Medium | [Solution](/solutions/dfs.md) |
| 10 | [Detonate The Maximum Bombs](https://leetcode.com/problems/detonate-the-maximum-bombs/) | Medium | [Solution](/solutions/dfs.md) |
| 11 | [Longest Path With Different Adjacent Characters](https://leetcode.com/problems/longest-path-with-different-adjacent-characters/) | Hard | [Solution](/solutions/dfs.md) |
| 12 | [Create Components With Same Value](https://leetcode.com/problems/create-components-with-same-value/) | Hard | [Solution](/solutions/dfs.md) |
| 13 | [Restore the Array From Adjacent Pairs](https://leetcode.com/problems/restore-the-array-from-adjacent-pairs/description/) | Medium | [Solution](/solutions/dfs.md) |## 13. Dijkstra
| S.No | Problem | Difficulty | Solution |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------------------------- |
| 1 | [Network Delay Time](https://leetcode.com/problems/network-delay-time/) | Medium | [Solution](/solutions/dijksta.md) |
| 2 | [Cheapest Flights Within K Stops](https://leetcode.com/problems/cheapest-flights-within-k-stops/) | Medium | [Solution](/solutions/dijksta.md) |
| 3 | [Path With Maximum Probability](https://leetcode.com/problems/path-with-maximum-probability/) | Medium | [Solution](/solutions/dijksta.md) |
| 4 | [Find The City With The Smallest Number of Neighbors At A Threshold Distance](https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/) | Medium | [Solution](/solutions/dijksta.md) |
| 5 | [Path With Minimum Effort](https://leetcode.com/problems/path-with-minimum-effort/) | Medium | [Solution](/solutions/dijksta.md) |
| 6 | [Number of Restricted Paths From First To Last Node](https://leetcode.com/problems/number-of-restricted-paths-from-first-to-last-node/) | Medium | [Solution](/solutions/dijksta.md) |
| 7 | [Number of Ways To Arrive At Destination](https://leetcode.com/problems/number-of-ways-to-arrive-at-destination/) | Medium | [Solution](/solutions/dijksta.md) |
| 8 | [Minimum Cost To Reach Destination In Time](https://leetcode.com/problems/minimum-cost-to-reach-destination-in-time/) | Medium | [Solution](/solutions/dijksta.md) |
| 9 | [Minimum Cost To Make At Least One Valid Path In A Grid](https://leetcode.com/problems/minimum-cost-to-make-at-least-one-valid-path-in-a-grid/) | Hard | [Solution](/solutions/dijksta.md) |
| 10 | [Reachable Nodes in Subdivided Graph](https://leetcode.com/problems/reachable-nodes-in-subdivided-graph/) | Hard | [Solution](/solutions/dijksta.md) |
| 11 | [Design Graph With Shortest Path Calculator](https://leetcode.com/problems/design-graph-with-shortest-path-calculator/) | Hard | [Solution](/solutions/dijksta.md) |## 14. Dynamic Programming
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------- | ---------- | ---------------------------- |
| 1 | [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/) | Easy | [Solution](/solutions/dp.md) |
| 2 | [Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/) | Easy | [Solution](/solutions/dp.md) |
| 3 | [Best Time To Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) | Easy | [Solution](/solutions/dp.md) |
| 4 | [Jump Game](https://leetcode.com/problems/jump-game/) | Medium | [Solution](/solutions/dp.md) |
| 5 | [Unique Paths](https://leetcode.com/problems/unique-paths/) | Medium | [Solution](/solutions/dp.md) |
| 6 | [Decode Ways](https://leetcode.com/problems/decode-ways/) | Medium | [Solution](/solutions/dp.md) |
| 7 | [Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/) | Medium | [Solution](/solutions/dp.md) |
| 8 | [House Robber](https://leetcode.com/problems/house-robber/) | Medium | [Solution](/solutions/dp.md) |
| 9 | [Word Break](https://leetcode.com/problems/word-break/) | Medium | [Solution](/solutions/dp.md) |
| 10 | [Coin Change](https://leetcode.com/problems/coin-change/) | Medium | [Solution](/solutions/dp.md) |
| 11 | [Count Number of Texts](https://leetcode.com/problems/count-number-of-texts/description/) | Medium | [Solution](/solutions/dp.md) |## 15. Euler Circuit
| S.No | Problem | Difficulty | Solution |
| ---- | --------------------------------------------------------------------------------------- | ---------- | --------------------------------------- |
| 1 | [Reconstruct Itinerary](https://leetcode.com/problems/reconstruct-itinerary/) | Hard | [Solution](/solutions/euler-circuit.md) |
| 2 | [Cracking The Safe](https://leetcode.com/problems/cracking-the-safe/) | Hard | [Solution](/solutions/euler-circuit.md) |
| 3 | [Valid Arrangement of Pairs](https://leetcode.com/problems/valid-arrangement-of-pairs/) | Hard | [Solution](/solutions/euler-circuit.md) |## 16. Fenwick Tree
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------- |
| 1 | [Shifting Letters II](https://leetcode.com/problems/shifting-letters-ii/) | Medium | [Solution](/solutions/fenwick-tree.md) |
| 2 | [Queries On A Permutation With Key](https://leetcode.com/problems/queries-on-a-permutation-with-key/) | Medium | [Solution](/solutions/fenwick-tree.md) |
| 3 | [Create Sorted Array Through Instructions](https://leetcode.com/problems/create-sorted-array-through-instructions/) | Hard | [Solution](/solutions/fenwick-tree.md) |
| 4 | [Count Good Triplets In An Array](https://leetcode.com/problems/count-good-triplets-in-an-array/) | Hard | [Solution](/solutions/fenwick-tree.md) |## 17. Greedy Scheduling
| S.No | Problem | Difficulty | Solution |
| ---- | ----------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Maximum Number of Events That Can Be Attended](https://leetcode.com/problems/maximum-number-of-events-that-can-be-attended/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 2 | [Single Threaded CPU](https://leetcode.com/problems/single-threaded-cpu/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |## 18. Heaps (Priority Queues)
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------ |
| 1 | [Sort Array By Increasing Frequency](https://leetcode.com/problems/sort-array-by-increasing-frequency/) | Easy | [Solution](/solutions/heaps/sort-array-by-increasing-frequency.md) |
| 2 | [Kth Largest Element in An Array](https://leetcode.com/problems/kth-largest-element-in-an-array/) | Medium | [Solution](/solutions/heaps/kth-largest-element-in-array.md) |
| 3 | [Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/) | Medium | [Solution](/solutions/heaps/top-k-frequent-elements.md) |
| 4 | [Sort Characters By Frequency](https://leetcode.com/problems/sort-characters-by-frequency/) | Medium | [Solution](/solutions/heaps/sort-characters-by-frequency.md) |
| 5 | [Find K Closest Elements](https://leetcode.com/problems/find-k-closest-elements/) | Medium | [Solution](/solutions/heaps) |
| 6 | [Top K Frequent Words](https://leetcode.com/problems/top-k-frequent-words/) | Medium | [Solution](/solutions/heaps) |
| 7 | [K Closest Points To Origin](https://leetcode.com/problems/k-closest-points-to-origin/) | Medium | [Solution](/solutions/heaps) |
| 8 | [Reduce Array Size To The Half](https://leetcode.com/problems/reduce-array-size-to-the-half/) | Medium | [Solution](/solutions/heaps) |
| 9 | [Reorganize String](https://leetcode.com/problems/reorganize-string/) | Medium | [Solution](/solutions/heaps) |
| 10 | [Sender With Largest Word Count](https://leetcode.com/problems/sender-with-largest-word-count/) | Medium | [Solution](/solutions/heaps) |
| 11 | [Minimum Difference In Sums After Removal of Elements](https://leetcode.com/problems/minimum-difference-in-sums-after-removal-of-elements/) | Hard | [Solution](/solutions/heaps) |
| 12 | [Course Schedule III](https://leetcode.com/problems/course-schedule-iii/) | Hard | [Solution](/solutions/heaps) |
| 13 | [Maximum Frequency Stack](https://leetcode.com/problems/maximum-frequency-stack/) | Hard | [Solution](/solutions/heaps) |## 19. Intervals
| S.No | Problem | Difficulty | Solution |
| ---- | ----------------------------------------------------------------------------------------------------------------------- | ---------- | ----------------------------------- |
| 1 | [Merge Intervals](https://leetcode.com/problems/merge-intervals/) | Medium | [Solution](/solutions/intervals.md) |
| 2 | [Insert Interval](https://leetcode.com/problems/insert-interval/) | Medium | [Solution](/solutions/intervals.md) |
| 3 | [Non Overlapping Intervals](https://leetcode.com/problems/non-overlapping-intervals/) | Medium | [Solution](/solutions/intervals.md) |
| 4 | [Minimum Number of Arrows To Burst Balloons](https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/) | Medium | [Solution](/solutions/intervals.md) |
| 5 | [My Calendar I](https://leetcode.com/problems/my-calendar-i/) | Medium | [Solution](/solutions/intervals.md) |
| 6 | [Video Stitching](https://leetcode.com/problems/video-stitching/) | Medium | [Solution](/solutions/intervals.md) |## 20. Line Sweep
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------ |
| 1 | [Maximum Population Year](https://leetcode.com/problems/maximum-population-year/) | Easy | [Solution](/solutions/line-sweep.md) |
| 2 | [Divide Intervals Into Minimum Number of Groups](https://leetcode.com/problems/divide-intervals-into-minimum-number-of-groups/) | Medium | [Solution](/solutions/line-sweep.md) |
| 3 | [Shifting Letters II](https://leetcode.com/problems/shifting-letters-ii/) | Medium | [Solution](/solutions/line-sweep.md) |
| 4 | [Describe The Painting](https://leetcode.com/problems/describe-the-painting/) | Medium | [Solution](/solutions/line-sweep.md) |
| 5 | [Minimum Absolute Difference Queries](https://leetcode.com/problems/minimum-absolute-difference-queries/) | Medium | [Solution](/solutions/line-sweep.md) |
| 6 | [Car Pooling](https://leetcode.com/problems/car-pooling/) | Medium | [Solution](/solutions/line-sweep.md) |
| 7 | [Corporate Flight Bookings](https://leetcode.com/problems/corporate-flight-bookings/) | Medium | [Solution](/solutions/line-sweep.md) |
| 8 | [My Calendar II](https://leetcode.com/problems/my-calendar-ii/) | Medium | [Solution](/solutions/line-sweep.md) |
| 9 | [Minimum Interval To Include Each Query](https://leetcode.com/problems/minimum-interval-to-include-each-query/) | Hard | [Solution](/solutions/line-sweep.md) |
| 10 | [My Calendar III](https://leetcode.com/problems/my-calendar-iii/) | Hard | [Solution](/solutions/line-sweep.md) |
| 11 | [The Skyline Problem](https://leetcode.com/problems/the-skyline-problem/) | Hard | [Solution](/solutions/line-sweep.md) |
| 12 | [Number of Flowers In Full Bloom](https://leetcode.com/problems/number-of-flowers-in-full-bloom/) | Hard | [Solution](/solutions/line-sweep.md) |## 21. Linked List
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------- |
| 1 | [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) | Easy | [Solution](/solutions/linked-list.md) |
| 2 | [Remove Duplicates From Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/) | Easy | [Solution](/solutions/linked-list.md) |
| 3 | [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) | Easy | [Solution](/solutions/linked-list.md) |
| 4 | [Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/) | Easy | [Solution](/solutions/linked-list.md) |
| 5 | [Middle of The Linked List](https://leetcode.com/problems/middle-of-the-linked-list/) | Easy | [Solution](/solutions/linked-list.md) |
| 6 | [Intersection of Two Linked List](https://leetcode.com/problems/intersection-of-two-linked-lists/) | Easy | [Solution](/solutions/linked-list.md) |
| 7 | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | Medium | [Solution](/solutions/linked-list.md) |
| 8 | [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 9 | [Rotate List](https://leetcode.com/problems/rotate-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 10 | [Next Greater Node In Linked List](https://leetcode.com/problems/next-greater-node-in-linked-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 11 | [Sort List](https://leetcode.com/problems/sort-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 12 | [Reorder List](https://leetcode.com/problems/reorder-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 13 | [Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/) | Medium | [Solution](/solutions/linked-list.md) |
| 14 | [Remove Duplicates From Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/) | Medium | [Solution](/solutions/linked-list.md) |
| 15 | [Partition List](https://leetcode.com/problems/partition-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 16 | [Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/) | Medium | [Solution](/solutions/linked-list.md) |
| 17 | [Flatten Binary Tree To Linked List](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 18 | [Populating Next Right Pointers In Each Node](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/) | Medium | [Solution](/solutions/linked-list.md) |
| 19 | [Copy List With Random Pointers](https://leetcode.com/problems/copy-list-with-random-pointer/) | Medium | [Solution](/solutions/linked-list.md) |
| 20 | [Delete Node In A Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 21 | [Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 22 | [Swapping Nodes In A Linked List](https://leetcode.com/problems/swapping-nodes-in-a-linked-list/) | Medium | [Solution](/solutions/linked-list.md) |
| 23 | [Merge Nodes In Between Zeros](https://leetcode.com/problems/merge-nodes-in-between-zeros/) | Medium | [Solution](/solutions/linked-list.md) |
| 24 | [Reverse Nodes In K Group](https://leetcode.com/problems/reverse-nodes-in-k-group/) | Hard | [Solution](/solutions/linked-list.md) |
| 25 | [Merge K Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/) | Hard | [Solution](/solutions/linked-list.md) |## 22. LIS
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ----------------------------- |
| 1 | [Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/) | Medium | [Solution](/solutions/lis.md) |
| 2 | [Increasing Triplet Subsequence](https://leetcode.com/problems/increasing-triplet-subsequence/) | Medium | [Solution](/solutions/lis.md) |
| 3 | [Minimum Number of Removals To Make Mountain Array](https://leetcode.com/problems/minimum-number-of-removals-to-make-mountain-array/) | Hard | [Solution](/solutions/lis.md) |
| 4 | [Find The Longest Valid Obstacle Course At Each Position](https://leetcode.com/problems/find-the-longest-valid-obstacle-course-at-each-position/) | Hard | [Solution](/solutions/lis.md) |## 23. Manacher
| S.No | Problem | Difficulty | Solution |
| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ---------------------------------- |
| 1 | [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/) | Medium | [Solution](/solutions/manacher.md) |
| 2 | [Maximum Product of The Length of Two Palindromic Substrings](https://leetcode.com/problems/maximum-product-of-the-length-of-two-palindromic-substrings/) | Hard | [Solution](/solutions/manacher.md) |## 24. Matrix
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------- |
| 1 | [Transpost Matrix](https://leetcode.com/problems/transpose-matrix/) | Easy | [Solution](/solutions/matrix.md) |
| 2 | [Count Submatrices With All Ones](https://leetcode.com/problems/count-submatrices-with-all-ones/) | Medium | [Solution](/solutions/matrix.md) |
| 3 | [Maximal Square](https://leetcode.com/problems/maximal-square/) | Medium | [Solution](/solutions/matrix.md) |
| 4 | [Shortest Path In Binary Matrix](https://leetcode.com/problems/shortest-path-in-binary-matrix/) | Medium | [Solution](/solutions/matrix.md) |
| 5 | [Sort The Matrix Diagonally](https://leetcode.com/problems/sort-the-matrix-diagonally/) | Medium | [Solution](/solutions/matrix.md) |
| 6 | [Count Square Submatrices With All Ones](https://leetcode.com/problems/count-square-submatrices-with-all-ones/) | Medium | [Solution](/solutions/matrix.md) |
| 7 | [Number of Submatrices That Sum To Target](https://leetcode.com/problems/number-of-submatrices-that-sum-to-target/) | Hard | [Solution](/solutions/matrix.md) |
| 8 | [Maximal Rectangle](https://leetcode.com/problems/maximal-rectangle/) | Hard | [Solution](/solutions/matrix.md) |## 25. Merge Sort
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------ |
| 1 | [Sort List](https://leetcode.com/problems/sort-list/) | Medium | [Solution](/solutions/merge-sort.md) |
| 2 | [Count of Smaller Numbers After Self](https://leetcode.com/problems/count-of-smaller-numbers-after-self/) | Medium | [Solution](/solutions/merge-sort.md) |
| 3 | [Count of Range Sum](https://leetcode.com/problems/count-of-range-sum/) | Medium | [Solution](/solutions/merge-sort.md) |
| 4 | [Reverse Pairs](https://leetcode.com/problems/reverse-pairs/) | Medium | [Solution](/solutions/merge-sort.md) |
| 5 | [Number of Pairs Satisfying Inequality](https://leetcode.com/problems/number-of-pairs-satisfying-inequality/) | Medium | [Solution](/solutions/merge-sort.md) |## 26. Minimum Spanning Trees
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------------------------- |
| 1 | [Min Cost To Connect All Points](https://leetcode.com/problems/min-cost-to-connect-all-points/) | Medium | [Solution](/solutions/kruskal.md) |
| 2 | [Find Critical And Pseudo Critical Edges in Minimum Spanning Tree](https://leetcode.com/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree/) | Medium | [Solution](/solutions/kruskal.md) |## 27. Prefix State Map
| S.No | Problem | Difficulty | Solution |
| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------ |
| 1 | [Contiguous Array](https://leetcode.com/problems/contiguous-array/) | Medium | [Solution](/solutions/prefix-state-map.md) |
| 2 | [Find The Longest Substring Containing Vowels In Even Counts](https://leetcode.com/problems/find-the-longest-substring-containing-vowels-in-even-counts/) | Medium | [Solution](/solutions/prefix-state-map.md) |
| 3 | [Find Longest Awesome Substring](https://leetcode.com/problems/find-longest-awesome-substring/) | Medium | [Solution](/solutions/prefix-state-map.md) |
| 4 | [Number of Wonderful Substrings](https://leetcode.com/problems/number-of-wonderful-substrings/submissions/) | Medium | [Solution](/solutions/prefix-state-map.md) |## 28. Queries
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------------------------- |
| 1 | [Most Beautiful Item For Each Query](https://leetcode.com/problems/most-beautiful-item-for-each-query/) | Medium | [Solution](/solutions/queries.md) |
| 2 | [Queries On Number of Points Inside A Circle](https://leetcode.com/problems/queries-on-number-of-points-inside-a-circle/) | Medium | [Solution](/solutions/queries.md) |
| 3 | [Range Frequency Queries](https://leetcode.com/problems/range-frequency-queries/) | Medium | [Solution](/solutions/queries.md) |
| 4 | [XOR Queries of a Subarray](https://leetcode.com/problems/xor-queries-of-a-subarray/) | Medium | [Solution](/solutions/queries.md) |
| 5 | [Queries On A Permutation With Key](https://leetcode.com/problems/queries-on-a-permutation-with-key/) | Medium | [Solution](/solutions/queries.md) |
| 6 | [Subrectangle Queries](https://leetcode.com/problems/subrectangle-queries/) | Medium | [Solution](/solutions/queries.md) |
| 7 | [Minimum Absolute Difference Queries](https://leetcode.com/problems/minimum-absolute-difference-queries/) | Medium | [Solution](/solutions/queries.md) |
| 8 | [Maximum Genetic Difference Query](https://leetcode.com/problems/maximum-genetic-difference-query/) | Hard | [Solution](/solutions/queries.md) |## 29. Rolling Hash
| S.No | Problem | Difficulty | Solution |
| ---- | ----------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Repeated DNA Sequences](https://leetcode.com/problems/repeated-dna-sequences/) | Medium | [Solution](/solutions/rolling-hash/repeated-dna-sequences.md) |
| 2 | [Shortest Palindrome](https://leetcode.com/problems/shortest-palindrome/) | Medium | [Solution](/solutions/rolling-hash/shortest-palindrome.md) |
| 3 | [Longest Duplicate Substring](https://leetcode.com/problems/longest-duplicate-substring/) | Medium | [Solution](/solutions/rolling-hash/longest-duplicate-substring.md) |
| 4 | [Distinct Echo Substrings](https://leetcode.com/problems/distinct-echo-substrings/) | Medium | [Solution](/solutions/rolling-hash/distinct-echo-substrings.md) |
| 5 | [K Divisible Elements Subarrays](https://leetcode.com/problems/k-divisible-elements-subarrays/) | Medium | [Solution](/solutions/rolling-hash/k-divisible-elements-subarray.md) |
| 6 | [Sum of Scores of Built Strings](https://leetcode.com/problems/sum-of-scores-of-built-strings/) | Hard | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 7 | [Find Substring With Given Hash Value](https://leetcode.com/problems/find-substring-with-given-hash-value/) | Hard | [Solution](/solutions/rolling-hash/find-substring-with-given-hash-value.md) |
| 8 | [Longest Common Subpath](https://leetcode.com/problems/longest-common-subpath/) | Hard | [Solution](/solutions/rolling-hash/longest-common-subpath.md) |## 30. Segment Tree
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------ | ---------- | -------------------------------------- |
| 1 | [Sum of Even Numbers After Queries](https://leetcode.com/problems/sum-of-even-numbers-after-queries/) | Medium | [Solution](/solutions/segment-tree.md) |
| 2 | [Range Sum Query - Mutable](https://leetcode.com/problems/range-sum-query-mutable/) | Medium | [Solution](/solutions/segment-tree.md) |
| 3 | [Longest Increasing Subseqence - II](https://leetcode.com/problems/longest-increasing-subsequence-ii/) | Medium | [Solution](/solutions/segment-tree.md) |
| 4 | [Shifting Letters - II](https://leetcode.com/problems/shifting-letters-ii/) | Medium | [Solution](/solutions/segment-tree.md) |
| 5 | [Falling Squares](https://leetcode.com/problems/falling-squares/) | Hard | [Solution](/solutions/segment-tree.md) |## 31. Sets
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------ |
| 1 | [Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/) | Medium | [Solution](/solutions/sets.md) |## 32. Sieve of Eratosthenes
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------- | ---------- | -------------------------------------------- |
| 1 | [Count Primes](https://leetcode.com/problems/count-primes/) | Medium | [Solution](/solutions/sieve-eratosthenes.md) |
| 2 | [Four Divisors](https://leetcode.com/problems/four-divisors/) | Medium | [Solution](/solutions/sieve-eratosthenes.md) |## 33. Sliding Window
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------- |
| 1 | [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/) | Medium | [Solution](/solutions/sliding-window.md) |
| 2 | [Minimum Size Subarray Sum](https://leetcode.com/problems/minimum-size-subarray-sum/) | Medium | [Solution](/solutions/sliding-window.md) |
| 3 | [Number of Smooth Descent Periods of Stock](https://leetcode.com/problems/number-of-smooth-descent-periods-of-a-stock/) | Medium | [Solution](/solutions/sliding-window.md) |
| 4 | [Maximize The Confusion of An Exam](https://leetcode.com/problems/maximize-the-confusion-of-an-exam/) | Medium | [Solution](/solutions/sliding-window.md) |
| 5 | [Frequency of Most Frequent Element](https://leetcode.com/problems/frequency-of-the-most-frequent-element/) | Medium | [Solution](/solutions/sliding-window.md) |
| 6 | [Max Consecutive Ones - III](https://leetcode.com/problems/max-consecutive-ones-iii/) | Medium | [Solution](/solutions/sliding-window.md) |
| 7 | [Longest Repeating Character Replacement](https://leetcode.com/problems/longest-repeating-character-replacement/) | Medium | [Solution](/solutions/sliding-window.md) |
| 8 | [Permutation In String](https://leetcode.com/problems/permutation-in-string/) | Medium | [Solution](/solutions/sliding-window.md) |
| 9 | [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring/) | Hard | [Solution](/solutions/sliding-window.md) |
| 10 | [Substring With Concatenation Of All Words](https://leetcode.com/problems/substring-with-concatenation-of-all-words/) | Hard | [Solution](/solutions/sliding-window.md) |
| 11 | [Count Subarrays With Fixed Count](https://leetcode.com/problems/count-subarrays-with-fixed-bounds/) | Hard | [Solution](/solutions/sliding-window/count-subarrays-with-fixed-count.md) |## 34. Stack
| S.No | Problem | Difficulty | Solution |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------- |
| 1 | [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) | Easy | [Solution](/solutions/stack.md) |
| 2 | [Implement Queue Using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) | Easy | [Solution](/solutions/stack.md) |
| 3 | [Next Greater Element I](https://leetcode.com/problems/next-greater-element-i/) | Easy | [Solution](/solutions/stack.md) |
| 4 | [Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/) | Easy | [Solution](/solutions/stack.md) |
| 5 | [Min Stack](https://leetcode.com/problems/min-stack/) | Medium | [Solution](/solutions/stack.md) |
| 6 | [Next Greater Element II](https://leetcode.com/problems/next-greater-element-ii/) | Medium | [Solution](/solutions/stack.md) |
| 7 | [132 Patterns](https://leetcode.com/problems/132-pattern/) | Medium | [Solution](/solutions/stack.md) |
| 8 | [Daily Temperatures](https://leetcode.com/problems/daily-temperatures/) | Medium | [Solution](/solutions/stack.md) |
| 9 | [Score of Parentheses](https://leetcode.com/problems/score-of-parentheses/) | Medium | [Solution](/solutions/stack.md) |
| 10 | [Validate Stack Sequences](https://leetcode.com/problems/validate-stack-sequences/) | Medium | [Solution](/solutions/stack.md) |
| 11 | [Next Greater Node In Linked List](https://leetcode.com/problems/next-greater-node-in-linked-list/) | Medium | [Solution](/solutions/stack.md) |
| 12 | [The Number of Weak Characters In The Game](https://leetcode.com/problems/the-number-of-weak-characters-in-the-game/) | Medium | [Solution](/solutions/stack.md) |
| 13 | [Construct Smallest Number From DI String](https://leetcode.com/problems/construct-smallest-number-from-di-string/) | Medium | [Solution](/solutions/stack.md) |
| 14 | [Maximum Frequency Stack](https://leetcode.com/problems/maximum-frequency-stack/) | Medium | [Solution](/solutions/stack.md) |
| 15 | [Basic Calculator](https://leetcode.com/problems/basic-calculator/) | Medium | [Solution](/solutions/stack.md) |
| 16 | [Longest Valid Parentheses](https://leetcode.com/problems/longest-valid-parentheses/) | Medium | [Solution](/solutions/stack.md) |
| 17 | [Using A Robot To Print The Lexicographically Smallest String](https://leetcode.com/problems/using-a-robot-to-print-the-lexicographically-smallest-string/) | Medium | [Solution](/solutions/stack.md) |## 35. Stringstream
| S.No | Problem | Difficulty | Solution |
| ---- | --------------------------------------------------------------------------------------------- | ---------- | -------------------------------------- |
| 1 | [Reverse Words In A String-III](https://leetcode.com/problems/reverse-words-in-a-string-iii/) | Medium | [Solution](/solutions/stringstream.md) |
| 2 | [Find Duplicate File In System](https://leetcode.com/problems/find-duplicate-file-in-system/) | Medium | [Solution](/solutions/stringstream.md) |
| 3 | [Apply Discount To Prices](https://leetcode.com/problems/apply-discount-to-prices/) | Medium | [Solution](/solutions/stringstream.md) |## 36. Sum of First N Natural Numbers
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------------------------- |
| 1 | [Count Number of Homogenous Substrings](https://leetcode.com/problems/count-number-of-homogenous-substrings/description/) | Medium | [Solution](/solutions/sum-of-first-n-natural-numbers.md) |
| 2 | [Number of Substrings With Only 1s](https://leetcode.com/problems/number-of-substrings-with-only-1s/description/) | Medium | [Solution](/solutions/sum-of-first-n-natural-numbers.md) |## 37. Topological Sort
| S.No | Problem | Difficulty | Solution |
| ---- | --------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------ |
| 1 | [Course Schedule](https://leetcode.com/problems/course-schedule/) | Medium | [Solution](/solutions/topological-sort.md) |
| 2 | [Course Schedule II](https://leetcode.com/problems/course-schedule-ii/) | Medium | [Solution](/solutions/topological-sort.md) |
| 3 | [Minimum Height Trees](https://leetcode.com/problems/minimum-height-trees/) | Medium | [Solution](/solutions/topological-sort.md) |
| 4 | [Longest Incresing Path In A Matrix](https://leetcode.com/problems/longest-increasing-path-in-a-matrix/) | Medium | [Solution](/solutions/topological-sort.md) |
| 5 | [All Ancestors of a Node In Directed Acyclic Graph](https://leetcode.com/problems/all-ancestors-of-a-node-in-a-directed-acyclic-graph/) | Medium | [Solution](/solutions/topological-sort.md) |
| 6 | [Number of Ways To Arrive At Destination](https://leetcode.com/problems/number-of-ways-to-arrive-at-destination/) | Medium | [Solution](/solutions/topological-sort.md) |
| 7 | [Parallel Courses III](https://leetcode.com/problems/parallel-courses-iii/) | Hard | [Solution](/solutions/topological-sort.md) |
| 8 | [Build A Matrix With Conditions](https://leetcode.com/problems/build-a-matrix-with-conditions/) | Hard | [Solution](/solutions/topological-sort.md) |## 38. Trie
| S.No | Problem | Difficulty | Solution |
| ---- | --------------------------------------------------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------- |
| 1 | [Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/) | Medium | [Solution](/solutions/trie/implement-trie.md) |
| 2 | [Search Suggestions System](https://leetcode.com/problems/search-suggestions-system/) | Medium | [Solution](/solutions/trie/search-suggestions-system.md) |
| 3 | [Maximum XOR of Two Numbers In An Array](https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array/) | Medium | [Solution](/solutions/trie/maximum-xor-of-two-numbers.md) |
| 4 | [K Divisible Elements Subarray](https://leetcode.com/problems/k-divisible-elements-subarrays/) | Medium | [Solution](/solutions/trie/k-divisible-elements-subarrays.md) |
| 5 | [Maximum Genetic Difference Query](https://leetcode.com/problems/maximum-genetic-difference-query/) | Hard | [Solution](/solutions/trie//maximum-genetic-difference-query.md) |
| 6 | [Concatenated Words](https://leetcode.com/problems/concatenated-words/) | Hard | [Solution](/solutions/trie/concatenated-words.md) |
| 7 | [Palindrome Pairs](https://leetcode.com/problems/palindrome-pairs/) | Hard | [Solution](/solutions/trie/palindrome-pairs.md) |
| 8 | [Sum of Prefix Scores of Strings](https://leetcode.com/problems/sum-of-prefix-scores-of-strings/) | Hard | [Solution](/solutions/trie/sum-of-prefix-scores-of-strings.md) |## 39. Two Dimensional Plane
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Max Points On A Line](https://leetcode.com/problems/max-points-on-a-line/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 2 | [Min Cost To Connect All Points](https://leetcode.com/problems/min-cost-to-connect-all-points/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 3 | [Queries On Number of Points Inside A Circle](https://leetcode.com/problems/queries-on-number-of-points-inside-a-circle/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 4 | [Detonate The Maximum Bombs](https://leetcode.com/problems/detonate-the-maximum-bombs/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |## 40. Two Pointer
| S.No | Problem | Difficulty | Solution |
| ---- | ------------------------------------------------------------------------------------------------------------ | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Two Sum](https://leetcode.com/problems/two-sum/) | Easy | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 2 | [Remove Duplicates From Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/) | Easy | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 3 | [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) | Easy | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 4 | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 5 | [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 6 | [3Sum](https://leetcode.com/problems/3sum/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 7 | [3Sum Closest](https://leetcode.com/problems/3sum-closest/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 8 | [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 9 | [Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 10 | [Sort Colors](https://leetcode.com/problems/sort-colors/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 11 | [Minimum Window Substring](https://leetcode.com/problems/minimum-window-substring/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 12 | [Linked List Cycle-II](https://leetcode.com/problems/linked-list-cycle-ii/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 13 | [Reorder List](https://leetcode.com/problems/reorder-list/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 14 | [Sort List](https://leetcode.com/problems/sort-list/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 15 | [Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 16 | [Lexicographically Smallest Palindrome](https://leetcode.com/problems/lexicographically-smallest-palindrome) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |## 41. Union Find
| S.No | Problem | Difficulty | Solution |
| ---- | ---------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| 1 | [Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 2 | [Number of Islands](https://leetcode.com/problems/number-of-islands/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 3 | [Number of Provinces](https://leetcode.com/problems/number-of-provinces/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 4 | [Redundant Connections](https://leetcode.com/problems/redundant-connection/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 5 | [Max Area of Island](https://leetcode.com/problems/max-area-of-island/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 6 | [Is Graph Bipartite ?](https://leetcode.com/problems/is-graph-bipartite/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 7 | [Satifiability of Equality Equations](https://leetcode.com/problems/satisfiability-of-equality-equations/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 8 | [Smallest String With Swaps](https://leetcode.com/problems/smallest-string-with-swaps/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |
| 9 | [Number of Good Paths](https://leetcode.com/problems/number-of-good-paths/) | Medium | [Solution](https://github.com/kiranpalsingh1806/awesome-dsa/blob/master/SOLUTIONS.md) |