Post

Make them write bubble-sort

I saw a joke post today about making someone write a bubble sort implementation on an interview. Companies asking to write that kind of stuff on a white board has become a bit of a standard joke, and it itself that makes sense.

Nobody will be writing sorting algorithms by hand any more, and the simplest correct answer would of course be to use whatever sorting algorithm is provided by your standard library.

I think there is still merit to the question though, specifically because it’s something you’d normally not do. I wouldn’t ask someone to write out a specific sorting algorithm on a whiteboard, but a general discussion about sorting can be very useful. It can be a very good topic to discuss the trade-offs between memory-intensive operations versus calculationally expensive operations.

Our job isn’t to know a bunch of algorithms by heart, it’s having a sense of how to approach a specific problem and being able to evaluate trade-offs. It’s about having insight into the consequences of technical choices you make and how to deal with constraints.

So, no don’t make them write bubble sort, but maybe do talk about it and see what their thoughts are.

This post is licensed under CC BY 4.0 by the author.