How long do you take before seeing the solutions from leetcode . I start off by trying to do it on my own and then see the solution but after few questions i directly see the solutions . Now I feel like I have memorized solutions for many questions and if I get any question apart from the ones that I studied I dunno if I can think in the right direction .
If you havent heard or solved the similar problem before..chances of solving it during the interview in 40 45 minutes are very less..
I give myself 5-15 min (depending on difficulty) to think of an approach. if I still don’t even know where to begin, I check out Discussion for a rough algorithm (not looking at the actual code) then I try to independently implement. if still can’t pass within another ~10 min, check Discuss again and really study code details
it’s not worth taking too long because you want to go through a lot of problems. but also not good to only memorize the solution. you should have practice with the whole process including how it feels to be stuck
Yes exactly . I want to go through a lot of problems. So I end up seeing the solution . Now I have a fear what to do if I get stuck .
It doesn’t matter how long it takes you the first time attempting a type of problem. The struggling itself is what is making you stronger, and if you find yourself quickly looking up and memorizing solutions then you are not helping yourself
Later 3 rounds of leet code I went straight to the answers ( not full rounds ) look where it gets me
Struggling for 2 hours on an LC hard, writing a suboptimal solution, cross-checking with discussion to fix solution to optimal, and spending 30 min wrestling with complexity analysis > getting stuck for 30 min, giving up, and looking at solution
Wrong, if you're stuck and not making any progress whatsoever for 2 hours sure but as long as you're making progress, no matter how slow and painful it is, struggling through the problem is super important. And even in that first case I described, you shouldn't just go for the solution, but feed yourself a small hint first.
I see most of the questions with solutions already on the leetcode even without paying for a subscription, so what extra we get when we pay for it?
tagged one , if you are targetting specific companies..After solving 100 google problems , its building my confidence and i think another 40 -50 , and i can go for amazon ms etc.
my style is different i never look at solutions. there has been cases where hard problems have taken couple of days until i solve them. i think this way you will not see a lot of problems but the fact that i have sold all problems by myself gives me a lot of confidence. Some people dont have any problem looking at solutions after a while and that might be more efficient.
I never look at provided solutions, would always try to make my own so I would remember if it gets asked...takes anywhere from 10 mins to an hour to solve depending on difficulty level...cheers