DEV Community

Vrinda Khandelwal
Vrinda Khandelwal

Posted on

🌟 Day 3 of My 150 Days of DSA Journey – Strings Special

Hello everyone! πŸ‘‹
Today marks Day 3 of my 150 Days of DSA Challenge. I decided to dive into string problems, and honestly, they were tricky but super interesting! Strings always look simple but can test your patience with edge cases.

Here are the problems I worked on today:

πŸ”Ή [3] Longest Substring Without Repeating Characters

Idea: Use a sliding window + last seen index of characters.

Learning: Hashing/index tricks help reduce time from O(NΒ²) β†’ O(N).

πŸ”Ή [5] Longest Palindromic Substring

Idea: Expand around center (each char / pair as a middle).

Learning: Elegant O(NΒ²) solution; DP works too, but expand-around-center feels intuitive.

πŸ”Ή [125] Valid Palindrome

Idea: Use two pointers from both ends, ignore non-alphanumeric chars.

Learning: Careful with character checks, but it’s straightforward.

πŸ”Ή [49] Group Anagrams

Idea: Sort each string β†’ use as a key β†’ group together.

Learning: Sorting + hashing go hand in hand!

πŸ”Ή [242] Valid Anagram

Idea: Count characters and compare.

Learning: Simple but builds foundation for harder problems.

πŸ’‘ Reflection:
Today taught me how powerful two pointers, hashing, and string manipulation are. Even though these problems look different, they all circle back to basic concepts like sliding windows, frequency maps, and expansions.

I’m really enjoying documenting this journey because it makes me accountable, and I know after 150 days, looking back at these posts will feel amazing.

πŸ‘‰ Tomorrow, I’ll move forward with more string problems / maybe a mix of hash-based challenges.

If you’re also solving these, let me know how you approached them β€” would love to learn from your strategies! πŸš€

100DaysOfCode #DSA #LeetCode #DevCommunity

Top comments (0)