spent 45 min stuck on a bug that turned out to be a typo.

spent 45 min stuck on a bug that turned out to be a typo. weirdly this is the most useful 45 minutes i've had in weeks.

was solving a sliding window problem, getting wrong output on one specific test case, and i could not figure out why. checked my window logic, my pointer movement, my condition for shrinking, everything looked correct on paper.

turns out i had written <= instead of < in one comparison. one character. 45 minutes.

normally i wou ld call this a waste of time. but going back through my notes from that session, i actually traced through my own logic line by line about six times trying to find it, and somewhere in there i think i understood window boundaries way better than i ever did just reading solutions. i was forced to question every assumption instead of trusting that my "approach" was right.

not saying go look for typos on purpose. just saying the next time you're stuck on something dumb and feel like you wasted your evening, you probably didn't.

Comments (0)