sometimes I spend days thinking I feel happy when I solve it but I think I should have done more. also thinking lot makes me tired. still not sure where to draw the line? what is your strategy for hard questions?
I agree. I feel it is stupid to spend more than 45 mins on a question if you are not able to solve it. Make a list of questions you weren’t able to solve and then look up the solution if it takes too much time. You can revisit the question after a week or so and attempt again and see how you fair.
Irrespective of difficulty level- I decide based on progress I am making. If I see myself stuck, I might just look up the solution in 5 min. I come up with a solution (bruteforce for that matter). Then if I think there is a scope of improvement, I keep thinking more. Again only until I see myself making some progress. Then I look at the time complexity of actual solution in discuss section. If I think I can do some progress, I keep thinking. Then look at tags. Then look at data structures used in solutions. Even then if I am not able to think anything, I look at the solution. On average, I spend 5 to 15 min as idle time. I.e. time I spent without making any progress. If I find problem very interesting and want to come up with my solution without looking at others, I revisit the problem after some time or next day.
2024 Tax
Yesterday
3995
Biden’s new tax proposal is wild
Tech Industry
2d
54696
Goog Employees Arrested
Tech Industry
Yesterday
25051
Google doing more layoffs, restructuring including country moves
India
Yesterday
1693
Please vote sensibly 🙏
Tech Industry
Yesterday
773
Chances of meta clearing E5 with screwing up one coding one round and acing all other
45 minutes before I look up the answer. You don't have that long in an interview so I don't want to spend that long in practice either.
good point thanks for your reply
I disagree actually, the process of thinking hard about a problem yields a lot of insights that are applicable beyond the immediate problem you’re solving.