A dedicated repository tracking my daily Data Structures & Algorithms practice, problem-solving intuition, and runtime analysis. Synced directly from LeetCode.
- Consistency: 1+ problem solved daily.
- Complexity First: Analyze time and space complexity before coding; optimize from brute force to optimal patterns.
- Pattern Mastery: Focus on core paradigms: Prefix/Suffix Products, Hash Maps, Two Pointers, Sliding Window, Monotonic Stacks, and Trees.
| Day | # | Problem | Topic | Difficulty | Optimal Approach | Time | Space |
|---|---|---|---|---|---|---|---|
| 01 | 0217 | Contains Duplicate | Arrays & Hashing | Easy | Hash Set Membership | ||
| 02 | 0242 | Valid Anagram | Arrays & Hashing | Easy | Frequency Array / Map | ||
| 03 | 0001 | Two Sum | Arrays & Hashing | Easy | One-Pass Hash Map | ||
| 04 | 0049 | Group Anagrams | Arrays & Hashing | Medium | Categorize by Sorted Str / Char Count Tuple | ||
| 05 | 0347 | Top K Frequent Elements | Arrays & Hashing | Medium | Bucket Sort / Min-Heap | ||
| 06 | 0238 | Product of Array Except Self | Arrays & Hashing | Medium | Prefix & Postfix Running Products | ||
| 07 | 0125 | Valid Palindrome | Two Pointers | Easy | Two Pointers (Inward Scan with isalnum) |
||
| 08 | 0167 | Two Sum II - Input Array Is Sorted | Two Pointers | Medium | Two Pointers (Converging Left/Right Bounds) | ||
| 09 | 0344 | Reverse String | Two Pointers | Easy | Two Pointers (In-place Swap) | ||
| 10 | 0283 | Move Zeroes | Two Pointers | Easy | Fast & Slow Pointers (In-place Partition) | ||
| 11 | 0027 | Remove Element | Two Pointers | Easy | Fast & Slow Pointers (In-place Overwrite) | ||
| 12 | 0026 | Remove Duplicates from Sorted Array | Two Pointers | Easy | Fast & Slow Pointers (Unique Element Placement) | ||
| 13 | 0977 | Squares of a Sorted Array | Two Pointers | Easy | Two Pointers (Outward-in Absolute Comparison) | ||
| 14 | 0643 | Maximum Average Subarray I | Sliding Window | Easy | Fixed-Size Sliding Window | ||
| 15 | 0209 | Minimum Size Subarray Sum | Sliding Window | Medium | Dynamic-Size Sliding Window (Shrinking Bounds) | ||
| 16 | 0003 | Longest Substring Without Repeating Characters | Sliding Window | Medium | Dynamic Sliding Window + Last Seen Index Map | ||
| 17 | 1004 | Max Consecutive Ones III | Sliding Window | Medium | Dynamic Sliding Window with Zero Counter ( |
||
| 18 | 0141 | Linked List Cycle | Linked List | Easy | Floyd's Cycle-Finding Algorithm (Tortoise & Hare) | ||
| 19 | 0142 | Linked List Cycle II | Linked List | Medium | Floyd's Cycle-Finding Algorithm + Phase 2 Intersection Scan | ||
| 20 | 0876 | Middle of the Linked List | Linked List | Easy | Fast & Slow Pointers (1x vs 2x Step Traversal) | ||
| 21 | 0202 | Happy Number | Hash Table / Two Pointers | Easy | Floyd's Cycle Detection on Digit Square Sums |
*Note on #238 & #977: The output array does not count as extra space for complexity analysis.
Solutions are synced automatically upon receiving an Accepted verdict:
leetcode-solutions/
├── 0217-contains-duplicate/
│ ├── README.md # Problem statement & constraints
│ └── contains-duplicate.py # Accepted implementation
├── 0242-valid-anagram/
│ ├── README.md
│ └── valid-anagram.py
├── 0001-two-sum/
│ ├── README.md
│ └── two-sum.py
├── 0049-group-anagrams/
│ ├── README.md
│ └── group-anagrams.py
├── 0347-top-k-frequent-elements/
│ ├── README.md
│ └── top-k-frequent-elements.py
└── 0238-product-of-array-except-self/
│ ├── README.md
│ └── product-of-array-except-self.py
└── 0125-valid-palindrome/
│ ├── README.md
│ └── valid-palindrome.py
└── 0167-two-sum-ii-input-array-is-sorted/
│ ├── README.md
│ └── two-sum-ii-input-array-is-sorted.py
└── 0344-reverse-string/
│ ├── README.md
│ └── reverse-string.py
└── 0283-move-zeroes/
│ ├── README.md
│ └── move-zeroes.py
└── 0027-remove-element/
│ ├── README.md
│ └── remove-element.py
├── 0026-remove-duplicates-from-sorted-array/
│ ├── README.md
│ └── remove-duplicates-from-sorted-array.py
└── 0977-squares-of-a-sorted-array/
│ ├── README.md
│ └── squares-of-a-sorted-array.py
├── 0643-maximum-average-subarray-i/
│ ├── README.md
│ └── maximum-average-subarray-i.py
└── 0209-minimum-size-subarray-sum/
│ ├── README.md
│ └── minimum-size-subarray-sum.py
├── 0003-longest-substring-without-repeating-characters/
│ ├── README.md
│ └── longest-substring-without-repeating-characters.py
└── 1004-max-consecutive-ones-iii/
│ ├── README.md
│ └── max-consecutive-ones-iii.py
├── 0141-linked-list-cycle/
│ ├── README.md
│ └── linked-list-cycle.py
└── 0142-linked-list-cycle-ii/
│ ├── README.md
│ └── linked-list-cycle-ii.py
├── 0876-middle-of-the-linked-list/
│ ├── README.md
│ └── middle-of-the-linked-list.py
└── 0202-happy-number/
│ ├── README.md
│ └── happy-number.py
└── .gitignore
└── Pattern Cheat Sheet.md
└── README.md
Platform: LeetCode
Automation: LeetSync / LeetHub v3 (automatic Git commits upon acceptance)
Primary Language: Python 3