Hacker News new | ask | show | jobs
by whiskyant 1620 days ago
Yeah, I practiced leetcode by spending about an hour a day for 2 months, but I had only done around 60 LC total (25 medium, 35 easy).

I didn't feel a need to do much more as they had very similar patterns. I did attempt the ones I had solved more than once though, but it was to really drill in the principles behind the problem rather than to try and "memorize" them.

Prior to my prep, I had almost 0 algorithm experience. I got an offer from every FAANG I applied for.

3 comments

Going to call bullshit on that, since in recent interviews most people have been getting hard problems and not "trapped rainwater" prefix sum hard problems, but the kind where the optimal solution has nearly 100 lines of code involving multiple steps (topological sort combined with dp and other garbage at one go).

Easy problems literally mean jack and I don't even think 50 medium problems could span all of the possible topics.

Sounds like you got in when it was easier.

It was 2019, so things may have changed but I doubt it. Maybe I was lucky? Or maybe you were unlucky. I also applied as a Senior SWE (mobile) if that makes any difference.

Out of the 12 companies I applied for I was given 2 hards (both were private startups), the rest were all mediums.

>nearly 100 lines of code involving multiple steps

I was never given anything even close to involving a 100 line solution. Are you sure this was even the correct/optimal solution? Either that or you're very unlucky. Which companies were asking such questions?

>50 medium problems could span all of the possible topics.

I was given problems that I hadn't encountered before, but I was able to solve them by deduction/critical thinking and applying the appropriate algorithms/patterns. Often the easy solution and the optimal solution weren't even that different, and just involved using a hashtable.

Grinding through hundreds of LC to try and memorize/familiarize yourself with the solutions really isn't the right method. Have you read Cracking the Coding Interview? Gayle McDowell has some videos on youtube in which she explains her process.

   I was given problems that I hadn't encountered before, but I was able to solve them by deduction/critical thinking and applying the appropriate algorithms/patterns. Often the easy solution and the optimal solution weren't even that different, and just involved using a hashtable.
Yeah, no.
this is the way. although your innate ability to learn and apply algorithms is probably above average :)
Including google and Facebook?
Yes, I accepted the FB offer.