r/leetcode • u/jackgoldberg123 • 11d ago
Discussion How long do you struggle on a problem before looking at the solution?
Curious how people here handle this. Some say give it 20-30 min and then read the editorial, others say keep struggling for an hour+ because that's where the actual learning happens. Does it change for mediums vs hards, or when you're prepping on a deadline vs just practicing? Would love to hear what actually worked for people who got through OAs and interviews.
2
Upvotes
1
u/Disastrous-Lemon7456 4d ago
I feel it depends on how lost you are, maybe I'll spend more time if I feel I'm getting somewhere.
If I really have no idea how to tackle at all probably will look at solution faster, like recently I encountered rolling hash and I had never seen that, so I was never go anywhere even with more time.
1
u/AutoModerator 11d ago
Your post has been filtered for manual review because you do not meet the minimum requirements to participate in this subreddit. Please wait for a moderator to approve it.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.