I expect a software engineer candidate I’m interviewing to be able to code Quicksort and Mergesort if woken up in the middle of the night after a day of doing a triathlon. Not being able to do so is a serious gap in an engineer’s understanding of data structures and algorithms.
I don’t expect I’ll ever ask a candidate to do that on a whiteboard, exactly because I see it as a given. Something is wrong if I’m interviewing a candidate who may be unsure how to write down fifteen lines of code that implement Quicksort, just like something is wrong if I’m interviewing a candidate who’s fuzzy on for loops.
I’m familiar with the sentiment that says that real software engineers call library functions when they need to sort, so they don’t need to know how Quicksort works. I believe this sentiment is deeply misguided.
If you can’t implement a simple Quicksort algorithm you are unlikely to be a successful software engineer in the companies I tend to work at, and that’s not because I expect you’ll be asked to implement Quicksort by next Tue afternoon.
It’s because Quicksort and Mergesort are two of the simplest, most fundamental algorithms which are part of an engineer’s basic knowledge. The core idea of those algorithms can be described in a sentence. If you can’t convert that sentence to code, you’re not ready to be an engineer in my company.
-Alon Amit
No comments:
Post a Comment