|
|
|
|
|
by erganemic
1406 days ago
|
|
Coming up with algorithms on the spot isn't a viable strategy for technical interviews any more, even if you're a super-genius. Here's a question that the page author claims took Donald Knuth 24 hours to solve [1], which is classified on Leetcode as a Medium(!) difficulty question [2]. Leetcode Medium questions are typically the cut-off point for most FAANG-tier interview questions--and while this is a hard medium, I know someone who got a variation of it at a Meta interview, and was expected to solve it in 30 minutes. So unless you're 48 times faster at inferring algorithms than one of the best algorists in the world, memorizing tricks is the game you have to play if you want a FAANG-adjacent job! Of course, then the natural reaction is "if your hiring process would pass on Donald Knuth, your hiring process is broken," which is absolutely true, already known, and (apparently) deemed acceptable. [1] https://keithschwarz.com/interesting/code/?dir=find-duplicat... [2] https://leetcode.com/problems/find-the-duplicate-number/ |
|
Personally I also feel that any question that needs an O(1) memory when you _start with an array_ is disingenuous. O(1) memory was used for things like tape storage, where N was some huge external storage. If you already have an array, then the chance you don't have double that memory are dibcus.