Today marks the completion of a full week of daily problem-solving. Seven days of pushing through challenges, refining problem-solving skills, and getting more familiar with fundamental concepts. But was today any different? Well, in some ways, yes.
š Problems Solved Today:
1ļøā£ Longest Repeating Character Replacement (Medium)
This problem involved finding the longest substring with at most k character replacements. Initially, a brute-force approach seemed viable, but the optimal solution used the sliding window technique.
Key learnings:
The sliding window approach efficiently tracks the most frequent character in a given window.
Expanding the window greedily while adjusting its size based on constraints helps optimize performance.
2ļøā£ Permutation in String (Medium)
Given two strings, the task was to check if one was a permutation (anagram) of the other within a sliding window. The first approach I considered involved sorting, but a frequency count array proved to be a more optimal solution.
Key learnings:
Using a frequency array (size 26 for lowercase letters) allows constant-time checks.
A sliding window approach efficiently maintains character counts while iterating.3ļøā£ Minimum Window Substring (Hard)
Finding the smallest substring containing all characters of another string was the challenge here. My initial approach involved multiple nested loops, but using a two-pointer technique significantly optimized performance.
Key learnings:
A hash map helps track the frequency of required characters.
Expanding and contracting the window efficiently ensures the smallest valid substring is found.
4ļøā£ Sliding Window Maximum (Hard)
This problem required finding the maximum element in each sliding window of size k. The brute-force approach of checking each window separately was too slow, leading me to the optimal deque (double-ended queue) approach.
Key learnings:
A monotonic deque efficiently maintains maximum values while sliding the window.
Removing elements outside the window and maintaining order ensures an O(n) solution instead of O(nĀ²).
The hard problems were tough to wrap my head around at first, but surprisingly, their implementation turned out to be much simpler. With the help of YouTube explanations, I managed to break them down and solve them.
But even after cracking these challenges, something feltā¦ different.
š¤ The Realization
While Iām definitely getting better at recognizing patterns and structuring solutions, Iāve noticed something unexpectedāI donāt feel the same excitement I used to.
Even after solving hard problems, there wasnāt that rush of satisfaction. And I think I finally understand why.
š A Possible Shift in Focus?
For a while now, Iāve been deeply involved in DevOps, Cloud, and Infrastructureāoptimizing deployments, designing scalable architectures, and working with cloud technologies. Thatās where my passion lies. Maybe thatās why DSA isnāt hitting the same way anymoreāitās not fully aligned with what truly excites me.
This realization is making me rethink my approach. Should I keep pushing forward with DSA? Or is it time for a major pivot?
ā³ Whatās Next?
Something is changing.
This past week has reinforced my fundamentals, but I can feel a shift comingāone that might take my learning in a whole new direction.
Iām working on a new roadmap, one that aligns more with what excites me the most. And trust me, this is just the beginning.
š Stay tunedāsomething big is coming.
Follow along if youāre curious about whatās next!