6 ms·
Grinding leetcode is inefficient. What you should be doing is familiarizing yourself with the common patterns you might expect to see in an interview. Look at t
by thebigspacefuck 3y ago
Grinding leetcode is inefficient. What you should be doing is familiarizing yourself with the common patterns you might expect to see in an interview. Look at the blind 75 and https://seanprashad.com/leetcode-patterns/ https://seanprashad.com/leetcode-patterns/.
Initially, you don’t need to solve any of the problems from scratch. Look up the problem on YouTube and someone will walk you through it. This will build your intuition of when to reach for a heap or for a DP array or when to do BFS, etc. If you don’t know these, then watch another video explaining the concepts. These videos are often 10-15 minutes so with a 30 minute time commitment a day you potentially can get through 3 a day, getting you through the complete blind 75 (more than enough) in less than a month or 1 of each of SP’s 22 patterns in a couple of weeks.
The great thing is you don’t need dedicated time for this approach, you can often start a video while tackling laundry or doing some dishes.
Then, start putting these into practice but spend no more than 10-15 minutes on the problem. If you can’t solve it, go watch the video again. There are so many times where you can have the right approach but make a stupid mistake that will cause you to flounder and you can pick up a better way of doing it. Eventually you will be solving these in 10-15 minutes and the time commitment will have remained at a minimum.
After this, find a new job that is only 40 hours a week and voila you’ve just opened up 10-20 hours for personal projects.
- rcarr 3y agoThis. Do not try and do the problems from scratch. All you will end up doing is frustrating yourself for hours and taking far longer to get through the material than you need to. You wouldn't do this in any other field e.g you wouldn't jump into a Linear Algebra textbook with no prior experience and expect to be able to solve all of the problems without first reading the chapters. Don't expect to be able to do that with coding interview patterns either. I'd recommend NeetCode but there's also Algomonster as well. https://neetcode.io/ https://neetcode.io/ https://algo.monster/ https://algo.monster/
- b20000 3y agoyou just confirmed you don’t need any actual skill and just learn the solutions by heart to get hired
- Stephen_0xFF 3y agoI’d agree with you if someone somehow managed to memorize all the problems line by line, but that isn’t the case. You’ve memorized how to build an array in your language of choice. You’ve memorized the patterns that require an array. You might’ve also picked up some techniques for splicing it. When I see a master working, be it in woodworking, art, or engineering, everything is second nature. Years of seeing what worked and what doesn’t and they make it look effortlessly — almost like they memorized it all. By all means, if the problem can be easily solved by DFS, but you want to be creative, try something else. If it was really creative, the interviewers will be sure to talk you up and you’ll beat out the “code monkey” that used DFS. If you invented some new type of search, I’ll look out for your paper on it. If you found a new way to hire and cut candidates only leaving the creative geniuses, I’m all ears.
- hnfong 3y agoIf learning how to solve problems by reading a book is "memorizing solutions by heart" then yes, that's how most people do things. Look, as much as you might want to believe you (and everyone else in the industry) are geniuses, the fact is that we memorize a lot of stuff that were painstakingly invented or discovered by great minds in the past. If that is "don't need any actual skill" according to your dictionary, then so be it.
- b20000 3y agoengineering is about creativity and practice and not about memorizing standard solutions. leetcode does not test the skills that matter.
- isbvhodnvemrwvn 3y agoGenerously assuming software engineering is engineering - so you think that mechanical engineers or civil engineers don't reuse solutions 99.99% of the time?
- pillefitz 3y agoPattern recognition is pretty much at the core of creative work in an engineering context, of which memorizing existing patterns is the first half.
- slashdev 3y ago> After this, find a new job that is only 40 hours a week and voila you’ve just opened up 10-20 hours for personal projects. That’s the key takeaway. If you want more time outside work, find a job that gives you more time. I once worked a 40% job (16 hours a week). I travelled through eastern Canada and all over Europe for four months while working that job, without any stress keeping up with it. More or less broke even on expenses/income. It’s a period of my life I wouldn’t change for anything.
- _lvbh 3y agoThis is good advice. Grinding leetcode literally almost killed me. Got a high fever after trying to go through it blind (as in without knowing anything about it and the patterns) and somehow almost sleepwalked off the balcony (20th floor)
- docandrew 3y agoThe “tips” section on that linked page is really good!
- sanderjd 3y agoWorking 40 hours a week with two small children does not leave "10-20 hours for personal projects". Spend that time with your family!
- cebert 3y agoThanks. Maybe I’m being too hard on myself.