Currently I'm trying to fight through it but wasted alot of time. Is it better to look up the answer? I'm worried if I look up the answer I'll never learn anything? Do you time box your attempts at solving something? My current one is an LC hard.
I’m stubborn and spend a few days thinking about it before caving in. It’s probably why I’ve only done 40 or so leetcode questions so far
Competitive programmers and leetcode pros recommend against that approach.
I feel like you’ll only get so much out of banging your head against a problem. What I like to do if possible is solve some easier related problems, take a break, then try to solve the hard problem again. A lot of the time I’ll have a Jimmy Neutron brain blast and solve it that time around.
That helps indeed!
+1 for the Jimmy Neutron reference
I spend about 20 to 30 mins. And look solutions if it doesn't work for me.
☝🏻 That’s the right thing to do IMO. People who spend days on problems they can’t solve can’t take the ego bruise and make their situation even worse. You do learn how not to solve a problem that way, but that’s all you learn and that still doesn’t get people jobs.
Whats the question?
Fap
Get back to work until you get an a new idea :P
Make a coffee then start crying