All Case Studies Design Development Interviews Our Way Project Management

Algorithms - Why Every Developer Should Know Them

Life is all about solving problems. Getting to the bottom of one issue usually creates two new ones, but this is what makes life so special. Some problems affect everyone – managing a family budget, finding the shortest route to a destination, or sorting laundry. Fortunately, with the help of algorithms and a healthy dose of creativity, everyday activities can become something more exciting than your run-of-the-mill entertainment.

Disclaimer: Going through the whole content of this article has O(1) complexity – if you know what it means and how you can make use of it, I recommend reading something more advanced.

If this was enough to convince you that algorithms are amazing, skip most of the article and start studying the materials presented in the last section. If not, let me steal a few minutes of your time to answer basic algorithm-related FAQs.

Have you ever used algorithms at work?

TL;DR: YES

The shortest definition of programming I have ever encountered is that coding is about finding a solution to a problem and finding an efficient solution to the same problem. Nobody has ever asked me to describe the performance of something I have implemented in a BigO notation. That said, I have, for instance, had to decide what was the best way to connect points on a map, so that user visits them only once and travels the shortest possible distance.  It would not have been possible, without a basic knowledge of the Travelling Salesman Problem and analyzing available solutions.

Trivia: Did you know that TSP algorithm still bothers a whole host of logistics companies – especially its optimization by minimizing the weight of the most weighty edge of the cycle?

Are algorithms difficult?

TL;DR: YES

Everything is difficult at first. Studying algorithms requires you to be patient, consistent and resilient. It is normal that you may feel overwhelmed at some point when solving algorithms-related tasks. Take a break and do not worry. We have all been there.

Why should I care about sorting algorithms if nobody implemented quicksort after 1970?

TL;DR: Go through the whole explanation. If you are that wrong, I cannot explain it to you in one sentence

There is no list of must-learn algorithms you need to know. Some people claim sorting algorithms are essential, others think that searching and cryptography is just as important. Choose the ones that sound helpful and easy at the beginning, so that you do not get discouraged too quickly. Do not try to reinvent the wheel – if someone has already implemented the algorithm you are after, there is no need to try and develop your own version from scratch. On the other hand, you can do it if you need some kind of an intellectual challenge.

Oh, and the date in this question is totally made up.

Do I have to know mathematics to start studying algorithms?

TL;DR: YES

It is helpful if you at least know the basics. Otherwise, you may get stuck at some point. If you realize that calculating definite integrals can be defined as finding a limit and summation, advanced mathematics does not sound scary, does it? I highly recommend revising logic, probability, functions, induction and the fundamentals of discrete mathematics.

Can I become a developer without knowing a single algorithm?

TL;DR: YES

Of course you can, but this article was about becoming a excellent one!

Books and tutorials

  1. Thomas H. Cormen, Algorithms unlocked
  2. Jacek Tomasiewicz, Zaprzyjaźnij się z algorytmami (unfortunately, this one is in Polish, but it’s the best I have ever read)
  3. SPOJ website
  4. Stanford University algorithms course at Coursera
New Call-to-action
Follow Netguru
Join our Newsletter

Scaling SaaS
READ ALSO FROM Dev
Read also
Need a successful project?
Estimate project or contact us