Drawing from Are algorithms (and efficiency in general) getting less important?, I get that algorithms are more important than ever, but I need to know anything about them other than their complexities?

I would expect to use algorithms out of a library of some sort that has been written by people that are much much more knowledgeable than me, and have been thoroughly tested (most of the STL comes to mind here, but also boost, and probably every other library that someone would care to name).

Thus, unless I am a library maintainer/implementer of some sort, do I need to know anything about these algorithms?

  • $\begingroup$ Have you considered learning "all" about algorithms and forming your own opinion? See here for an ages-old example (that is still relevant!) for why you need to know more than $O$-complexities of problems (note: algorithms have runtimes, not complexities). $\endgroup$
    – Raphael
    Commented Oct 14, 2013 at 7:51
  • $\begingroup$ unf a lot of important algorithms are not widely available or in particular languages etc... $\endgroup$
    – vzn
    Commented Oct 14, 2013 at 15:19

2 Answers 2


If you do anything a bit complicated, you will almost certainly have to design your own algorithms. STL/boost are nice, amazing really, but it is useful to know how things work behinds the scenes and be able to reproduce it. This will help you tackle problems that the STL/boost, generic enough as they are, cannot handle; or problems that are entirely different from the ones the STL/boost can help with. Many times, algorithms and data structures that I've designed were built on top of STL/boost.

Thus, unless I am a library maintainer/implementer of some sort, do I need to know anything about these algorithms.

Chances are, if you make any interesting programs, you are going to find it useful to design some algorithms and data structures. Sometimes, the most effective optimizations cannot beat a simple change in methodology or representation.

Unless the algorithm you require/design is useful to a wider audience, it can sometimes be difficult to package it as a useful library. Perhaps you will find that something you made can be useful, and will publish it (github is chock full of these projects). Therefore, I think that if you program long enough, you will become a "library maintainer/implementer of some sort", even if you are the only one using it, for lack of publicity.

Bottom line: I don't think libraries like STL and Boost are making knowing algorithms less important at all; rather they are making more advanced algorithms within reach. While libraries such as these can sometimes make knowledge of their algorithms unnecessary for small programs, in practice it can important to know if you intend to design anything complex.

  • 1
    $\begingroup$ Another C++ example: knowing the basics of hash tables will help you understand why you can't do certain things with std::set/std::map with respect to immutability of keys. $\endgroup$
    – Juho
    Commented Oct 13, 2013 at 19:18

Algorithms are step-by-step problem-solving procedures that are suited for computer implementations. So I don't see how you can become a serious programmer without knowing algorithms.

The standard algorithms and data-structures implemented in standard library are primitive building-blocks, and won't help in designing methods for solving problems. Just like you can't write a novel from taking words or phrases from dictionary. I also consider writing programs a creative process! But surely having the building blocks will help you implement your algorithms faster.

Please also see my other answer: https://cs.stackexchange.com/a/16033/204


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.