A collection of LeetCode problems solved using Prefix Sum pattern techniques, explanations, and complexity analysis.
| # | Problem | Language | Time | Space | Explanation |
|---|---|---|---|---|---|
| 745 | Prefix and Suffix Search | Python | O(n) | O(n) | Explanation |
| 1392 | Longest Happy Prefix | Python | O(n) | O(n) | Explanation |
| 1563 | Stone Game V | Java | O(n) | O(n) | Explanation |
| 1872 | Stone Game VIII | Java | O(n) | O(n) | Explanation |
| 2003 | Smallest Missing Genetic Value in Each Subtree | Python | O(n) | O(n) | Explanation |
| 2132 | Stamping the Grid | Python | O(n) | O(n) | Explanation |
| 2179 | Count Good Triplets in an Array | JavaScript | O(n) | O(n) | Explanation |
| 2416 | Sum of Prefix Scores of Strings | Python | O(n) | O(n) | Explanation |
| 2528 | Maximize the Minimum Powered City | JavaScript | O(n) | O(n) | Explanation |
| 3045 | Count Prefix and Suffix Pairs II | Python | O(n) | O(n) | Explanation |
| 3312 | Sorted GCD Pair Queries | PHP | O(n) | O(n) | Explanation |
| 3485 | Longest Common Prefix of K Strings After Removal | Python | O(n) | O(n) | Explanation |
| 3699 | Number of ZigZag Arrays I | PHP | O(n) | O(n) | Explanation |
| 3739 | Count Subarrays With Majority Element II | PHP | O(n) | O(n) | Explanation |
| 3762 | Minimum Operations to Equalize Subarrays | Python | O(n) | O(n) | Explanation |