π 23 Jul 2025
View on Github β| Problem | Pattern / Concept |
|---|---|
| Sum of Digits | Use % 10 to extract digits, / 10 to reduce number |
| Factorial | Loop-based multiplication |
| Merge 2 Sorted Arrays | Two-pointer technique |
| Count Frequency | Use HashMap to map element β count |
| Missing Number | Use sum of n formula or XOR logic |
| Remove Duplicates | Use Set to eliminate repeats |
| Max Subarray Sum | Kadaneβs Algorithm (dynamic programming) |
Kadaneβs Algorithm stood out β it feels magical how a greedy local sum helps track global max subarray!
DSA is starting to feel intuitive now. Iβm seeing how many problems reuse similar ideas: pointers, hash maps, or math. Understanding the underlying patterns is 100x more effective than memorizing solutions.