4 ms·
> Could you implement insertion sort from scratch at a whiteboard in less that 45 minutes? Including getting the partitioning part right? It's tricky, and at a
by curtis 10y ago
> Could you implement insertion sort from scratch at a whiteboard in less that 45 minutes? Including getting the partitioning part right? It's tricky, and at a whiteboard, it's particularly difficult to get right (well, for me it is).
I think you have confused insertion sort with quicksort. Let me stress that not only would I have difficulty doing quicksort correctly in 45 minutes on a whiteboard, I'd have difficulty doing it in twice that time on a computer. And for exactly the reason that you specify -- the partitioning part of the algorithm is very hard to get right.
Insertion sort, on the other hand, is a breeze.
It might be reasonable to ask somebody to code the recursive part of quicksort assuming that they already had a function to do the partitioning part. This might be useful to see if they understand recursion.
- curtis 10y ago> But me? Yeah, I'm out. No more whiteboard oral exams, no more uncompensated "take home projects". Done. If this were part of some sort of professional certification, widely recognized in the industry, that I could properly prepare for and take as a lasting, industry respected credential, then I'd do it. But no more tech exams or take homes at the whim of a potential employer. I've wasted enough time on this. I've never had a big gripe about whiteboard coding exercises, but I'm with you on the take home projects. My big complaint right now is that it has become increasingly difficult to get through the first level of screening to even get to a proper interview loop where someone could even ask me to code on a whiteboard.
- deleted 10y ago[deleted]
- geebee 10y agoYou're right, I did mix up insertion sort and quick sort.