Skip links

Why do we challenge our candidates with algorithms tests?

“Why do you ask candidates to do algorithms challenges?” It’s a question that usually happens in our interviews. It may appear that most software development jobs are on a category that won’t require you to use advanced algorithms. Tasks like getting data from a REST API and showing them to the user in an accessible way, are the most common.

Female software engineers in discussion in front of whiteboard
Photo by ThisisEngineering RAEng on Unsplash

Algorithms and Data Structures, why?

So let’s approach this question describing when knowledge of algorithms and data structures kick in -in unexpected ways sometimes- into our jobs.

One of the clearest examples is the usage of indexes in databases. It happens that certain queries start being very slow in systems where load and size have increased. Even optimizing the query (tables order, using less data, etc) would not be enough and the need of creating an index arises. Why indexes? Well, basic understanding of data structures make it easy to understand how data access speed is influenced by the data structures enabling it. The most common index in databases are B-tree indexes, which enable searches, access, etc in logarithmmic time. So we have it, algorithms and data structures come along again.

child playing with water
Image by Mandy Klein from Pixabay

There is something called, “The Law of leaky abstractions” or “leaky abstractions” as is. Simply said, we could trust that the database itself will take the query and run it in efficiently. As we said before, this happens to be wrong in the long run. Sooner than later, the developer (or DBA?) will have to get his hands dirty and make that query perform better, regardless of semantics.

How does this all DB SQL Query thing relates with algorithmic tests? Well, those tests will reveal if the developer is aware of performance impact on many decisions during development. Unnecessary loops, or extra storage used may show disregard on knowing how things work, or that some knowledge is missing.

In some interviews we could find that developers rely too much on a given language libraries (data structures, strings, etc), to the extent that they think the library does magic and they wouldn’t explain “how they would implement it if they had to”. This kind of shallow knowledge gives us developers that, for example, don’t know how sorting works or why allocating memory for arrays in each write access is not good.

Solutions made by aware developers will always have those performance concerns on the radar, which makes those kind of solutions desirable. Clients know that, and in their search for great developers, most of them will want to be sure that the candidate has what it takes.

ENIAC Programming

That’s the reason why at Hand-Picked we do both automated algorithm tests and live coding interviews. We are interested in knowing that our developers will make the cut and have low chances of obvious performance blunders.

I would like to mention some notes about performance in general, there is a saying

Premature optimization is the root of all evil

Credited to Donald Knuth, in a longer sentence

which basically states that acting on performance when it isn’t important, does more harm than good. Will you spend time trying out an idea for your customers to use, or rather seeing if you’ll need a Big Data database to store analytics? Above all, even though algorithmic knowledge is valuable, it is more valuable for the developer to have criteria when taking decisions. So there is also other phrase about priorities.

Make it work, Make it nice, Make it fast

This formulation of this statement has been attributed to Kent Beck

We can see that making it work (correct, do what it is intended) and ‘nice’ (which means, making maintainable code in some way) come first. What will you make fast if it doesn’t work at all? Rhetoric question, as it may happen that not making something fast enough, may make the thing NOT WORK AT ALL for a given volume, users quantity or data amount. So always pay attention, it may happen that performance could be of utter importance.

These two phrases and that counter-argument may look contradictory but they are put together here just to show how good criteria must always be on top.


As performance is an important point in Software Development, Hand-Picked verifies the algorithmic knowledge of its candidates through an Automated Coding Platform and a Live Coding interview. This way we know we are dealing with a candidate that has the proper tools to solve performance problems that may arise during their engagements. But we don’t exaggerate it, solving CS Olympics level problems isn’t a requirement to enter the Hand-Picked network, just a good level of criteria when coding.

Cover Photo by Alvaro Reyes on Unsplash

Leave a comment