views:

342

answers:

5

Most of us may have gone through a mandatory course in algorithms during our college days. In those classes I remember learning so many different algorithms (even for simple string comparison) that I have barely used when I started to develop software.

Have you ever had use for any algorithms you learned back in college and have you ever actually used them in the application that you developed? I am not talking binary search :)

EDIT: I guess I was ambiguous. I am only interested in knowing the algorithm and the application that used it. Not whether I should have learned them or not. Of course, I know it is important to understand the difference between an O(n) and an O(1) and many other aspects of algorithmic understanding.

EDIT_2: Thanks Yuval for the SO link. I should have searched for the question before posting. Sorry about the redundant post.

Related question: Real world implementations of “classical algorithms”

A: 

I can think of the quicksort algorithm. And some tree processing algorithms.

But most of the algorithms I learned back then are the foundation. You will use them sometimes. But most of the time you will be using combinations.

You don't need to memorize them, you need to understand them and be able to reproduce them in the apropriate way.

Gamecat
A: 

Even if you don't implement them directly, you're surely using something to sort or search in your apps, aren't you? Having knowledge of algorithms can help you understand why your app suddenly feels much slower when searching, for example. Or maybe it's Java, and understanding somewhat the algorithm for GC helps you profile.

It's, at any rate, basic knowledge. You don't have a use for them, but depending on your career choice after college, you might: get into compiler design, language design, game programming, 3D and other professions, and you're bound to have a use for some of those algorithms.

Adriano Varoli Piazza
+1  A: 

Please check out this SO question. The answers, including my own, can be summarized as:

  • Understanding algorithms helps you in your daily programming.
  • Some of us have used several algorithms we learned in college in our work.
  • Knowing the algorithms helps you choose among several libraries and implementations.
Yuval F
A: 

Graph algorithms come in handy. Topological Sort, Strongly Connected Components, "Reverse DFS Postorder".

Most of my experience using these, however, has come in developing compilers.

Scott Wisniewski
A: 

If you're using undergraduate algorithms in your enterprise apps, you're probably using the wrong libraries. ;-)

Dave Markle