|
|
|
|
|
by Fattestmoron
1632 days ago
|
|
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. |
|
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.