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.
Tech Industry
8h
887
I haven’t done shit today!
Tech Industry
Yesterday
38099
Worried that our top performer is an attrition risk. How do managers handle this?
2024 Presidential Election
7h
234
Palestine campus protests are a conspiracy to stop the election
AMA
Yesterday
3730
I’m a professional coaster AMA
Tech Industry
11h
2816
Avoid teams with only Chinese or Indians especially with a Chinese/Indian manager
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.