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.
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.
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.
OP claims to have done 400+ LC problems over a couple of months. Let me say it out loud here: this is simply crazy. It strikes me as an attempt to not learn how to tackle these challenges, but to actually brute-force through them. To anyone preparing for an interview: don't do this! Grab a book like Elements of Programming Interviews (EPI), maybe follow some online courses on programming puzzle patterns, and then start grinding LC. Maybe interleave grinding with learning? Your end goal should be to develop deep understanding of what you are doing, not memorise the solutions.
Also, while going through LeetCode, it is very important to realise that the problem classification there is a bit wild at times. Don't stress that you cannot solve a medium sometimes as they are mislabeled. I did mediums that could be hards, hards that could be mediums, and hards that were just impossibly hard. Typically a very hard problem is not something you should expect in an interview setting as most interviers* don't expect you to implement KMP on the spot. Doesn't hurt to know it and impress the interviewer with knowledge, but if you think memorising KMP is the way, you're mistaken.
* - there is still luck involved and you can have a crazy interviewer. It can happen, so just accept it and move on. Don't treat it as a personal defeat.
Source: I grinded and I had offers from most of FAANG letters.