Hacker News new | ask | show | jobs
by driverdan 1986 days ago
Only if the role you're hiring for requires directly applying those algos. A high level understanding is good but implementation knowledge isn't.

I've been in this industry for almost 15 years. I've never once had to write a low level algo implementation. On the few occasions I had to dig that deep into code I looked up what I'd forgotten. If someone asked me to whiteboard bubble sort I'd choke.

There's no need to know it all by heart and recall it on demand unless the job you're doing requires it.

2 comments

You rarely need to write your own sort or hashmap, but you should absolutely understand at a high level how those algorithms work, how to analyze them, and the key concepts that go into their design.

The point of the undergrad CS syllabus is not to teach you specific algorithms, but to give you a toolkit for solving problems. The goal of a SWE interview should be to test your ability to apply that toolkit to a "new" problem.

Amazon asked me to implement a hashtable and email the interviewer the solution by the next morning.

I politely declined; was heading off to Spain for a long weekend.

IMO that's not a good interview question even f2f, let alone on email. As an interviewer I would learn nothing from that, and I agree it's unreasonable to give an interviewee homework.

As far as I know, that is not SOP for FANG interviews.

This was nearly 10 years ago.
Disclaimer: I'm in a position at FB where I participate in candidate reviews.

> If someone asked me to whiteboard bubble sort I'd choke.

I came in to FB just shy of 20 YOE, and I consider "Google" to be a valid answer to that sort of question. Writing low level algorithms is a waste of time, not a skill. That said, I think it's ok to expect people to be aware of them.

Could you describe the algorithm for it, though? What about traversing a tree? Would you be able to talk it through and then be able to implement it? What about proactively verifying that your algorithm was correct for standard and edge cases? Can you evaluate your solution for time & space complexity?

If the answer to these is yes, that's sufficient to pass the coding interview. This is also where I think think more experienced candidates really shine. Aside from handcrafting algos that are best left to libraries, the others are things that senior folks who have been there and done that just do intuitively.

Interviewers definitely want code that works, but being able to do the other things is equally important. The review process itself also doesn't allow one bad interviewer to sink the candidate.