DEV Community

Discussion on: Why you need to learn to write a sorting algorithm

 
blindfish3 profile image
Ben Calder

You're right: not everyone gets to be choosy; but I don't think that means you have to learn sort algorithms (or all the other possible 'standard' problems you might be set) for the purpose of passing ill-conceived interviews; and I think that was the point of the article ;)

I wouldn't advocate refusing to do a task in an interview; but you could instead talk through the processes you'd follow in order to solve a problem: e.g. why would I need a bespoke sort here when I know there are plenty of built-in options? Is performance really going to be such an issue that the extra development time is justified? How will I test performance? How do I establish if the solution I found is the most appropriate? etc. That demonstrates thought processes that are going to be much more useful to an employer than the fact you memorised something that can easily be found online.