3 ms·
This is missing the point of such questions. They aren’t aimed at asking “how would you solve this easy task?”. What they’re checking is “since we can’t have yo
by ummonk 5y ago
This is missing the point of such questions. They aren’t aimed at asking “how would you solve this easy task?”. What they’re checking is “since we can’t have you demonstrate how you would solve a complex task in the short time allotted to an interview, let’s see how you can solve a smaller pretend task.”
- flukus 5y agoIn practice for this particular question they're asking if you've memorized sort algorithms. I have not (or I've forgotten since) and I doubt even the brightest minds of the industry that did invent them did so within an hour long job interview.
- hansvm 5y agoWas that (implement sort) the main point of the question? Especially given the 15 minute time window this sounds more like some kind of fizzbuzz-style question (here's a basic idea, can you translate it to code somehow in some language?). Usually when interviewers give me that kind of thing they're literally fine with bubble-sort (which I'd hope anyone could code on the fly), or even just assuming some appropriately shaped sort function exists and writing the rest of the code around it.
- ummonk 5y agoNo that's not what the question is asking. You should be using the standard library sort function (or making one up if you can't remember the specific API).