Hacker News new | ask | show | jobs
by jameshart 4111 days ago
I think it's more important to be aware of the kinds of problems for which you don't need to reinvent the wheel, and to know the terminology and domain keywords which will help you evaluate the correct approach in a given situation when you encounter it. The useful knowledge is not the specific implementation details of the algorithm, but the ability to look at a real problem and realize 'this is like looking for the longest matching substring' or 'this is similar to finding a convex hull'. Then you can go and try to find the best way to implement a convex hull calculation in your particular circumstances. Just because you don't know an optimal convex hull algorithm off the top of your head doesn't tell me much.

What I'm looking for in asking somewhat algorithmic questions in an interview is the ability of the coder to reduce a problem to one which has probably already been solved. A separate but interesting problem is, given such a solution, how well can you implement it - but that's more of a fizzbuzz exercise in many cases.

1 comments

Sure, I agree about reduction to known problems, but still, understanding algorithms completely is more powerful than manipulating them as "black boxes", as the former allows to build upon ideas of algorithms and produce variations of algorithms, and generally gives a lot of insights and patterns of algorithmic problem solving. The relation is kind of like below:

(No algo) < (Blackbox algo) < (Whitebox algo)