Need tips to solve leetcode questions. Sometimes I'm just stuck on problem for a long time. How to approach to solve any kind of problem?
Try solving half of the problem if you can. Otherwise peek the answer. You don't know what you don't know...
just do them. you get better & better
Don't spend too much time stuck. It will drain your morale. Give yourself 40 minutes, then look at the answer. If you don't understand the answers, try to find YouTube videos or blog posts explaining them. Back2backswe is a good one. No affiliation.
Define “long time” what’s your strategy and average LC session look like.
If I cannot figure out a question within 5 minutes I’d search for answers. What you learn and summarize from those answers are more important.
did this approach help you pass any tough interview so far?
Start with 50 easys. If you solve those quickly, then move into mediums. Hards are pretty tricky tbh I just attempt then peek answers/memorize lol
Provide the right answer
How? What's the approach ? Any set guidelines like follow step 1 ..then step 2 kind of approach?