3 ms·
I don't like algorithms as an interview structure but I do think they have one property that people way underestimate. Algorithms test your ability to manipulat
by bananaface 6y ago
I don't like algorithms as an interview structure but I do think they have one property that people way underestimate. Algorithms test your ability to manipulate a complex problem in your head without being able to break it down.
Most coding problems can be broken apart and the individual components tackled one by one. But that has two problems. One, it doesn't stress-test the programmer. Two, the most beneficial changes to a codebase come from a high-level understanding of the system. Implementation might be segmented, but the more of the system you can simultaneously understand & manipulate in your head, the better placed you are to manipulate the architecture.
Complex algo questions force you to manipulate a fundamentally complex problem. You can break it apart in some ways, but in general you have to be able to think about the entire basic algorithm in your head. Reversing a binary tree? You have to be able to visualise the datastructure you're manipulating and figure out what changes you need to make before you start writing. It's a stress test, it tests horsepower.
Granted, you can game that system by doing practice questions which undermines it to an enormous degree but I'm not sure what else you can do to test that.
- collyw 6y agoThe problem I have with algorithms is I can get good at them if I practice them all the time - basically like I did at university 20 years ago. I have barely used them in real jobs since, so while I write far better (more readable maintainable, performant) code now, I am far worse at answering this stuff in an interview. Also a number of times I haven't got an answer in an interview only for something to pop into my head ten minutes out of the door (or a far more elegant solution came to me). You might as well toss a coin and save me the hassle.