DEV Community

Vrinda Khandelwal
Vrinda Khandelwal

Posted on

πŸš€ Day 4 – Strings Advanced (LeetCode Challenge)

 Today was all about strings – not the musical ones 🎸 but the tricky coding ones.
I jumped into some advanced string problems, and wow, they really stretched my brain.

Problems I tackled:

πŸ”Ž [76] Minimum Window Substring – Sliding window at its finest. Took a while to wrap my head around all the shrinking and expanding, but it’s honestly such a beautiful pattern.

βœ… [20] Valid Parentheses – Classic stack problem. Still satisfying every single time the brackets line up just right.

βž• [415] Add Strings – No built-in big integer magic here, just pure digit-by-digit addition like we did in school.

πŸ”„ [151] Reverse Words in a String – Reminded me that trimming spaces and reversing aren’t as simple as they sound.

🌱 [14] Longest Common Prefix – Surprisingly elegant once you see the trick of comparing characters across strings.

πŸ’‘ Takeaways:

Sliding window problems demand patience (and lots of debugging πŸ˜…).

Stacks are lifesavers when things need to stay in order.

Sometimes coding feels like going back to primary school math (and that’s not a bad thing).

"Simple" string problems can hide messy details – trimming spaces, handling edge cases, etc.

✨ That’s a wrap for Day 4. Strings may look simple, but they sure know how to test logic and patience. On to Day 5 tomorrow!

Top comments (0)