Many years ago that was easy for me to solve many coding problems. Nowadays, I'm struggling a lot with almost any problem. The reason? Someone suggested that's based on experience that I got for these years.
In addition, after looking into some very tricky (and smart!) solutions for some problems, I unintentionally started to look the same way for all problems. Almost from the first seconds, I give up a naive solution, like "alright, it's at least O(n^2) but, definitely, we can do better." And then it starts: "Okay, we can sort it out. O(n logn). Would it work? Probably. Maybe we do O(n)...". At this moment I usually stuck so hard that it leads to stress that doesn't allow me to come back to even a naive solution!
What's the most frustrating? The answer was O(n^2) and only 1-2 solution that uses O (n logn) with some restrictions/limitations that might not work for some cases. The only way that I see is not to look into solutions but it feels like it's too late...
I'd appreciate any advice except "Relax" or "Just do a naive solution at least", it doesn't work, or some links to discussions with the same topic that I didn't find.