Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a 'design pattern' styled listing of common/popular algorithms anywhere? Specifically, something that has a similar format along the lines of:

Algorithm Name: e.g., Quick Sort, Bubble Sort, etc.
Problem: A description of the stereotypical problem the algorithm is supposed to address
Description: Description of the solution
Implementation: Code examples of the solution
Big O Rating: Self-explanatory
Similar Algorithms: Algorithms that address the same problem in different ways, or similar problems

I really like the GoF design pattern listing style, and I think it would help me learn various algorithms better/easier if I could find a resource that was similar in terms of organization.

share|improve this question

closed as off-topic by gnat, MichaelT, mattnz, BЈовић, Bart van Ingen Schenau Aug 25 '13 at 17:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, Community, mattnz, BЈовић, Bart van Ingen Schenau
If this question can be reworded to fit the rules in the help center, please edit the question.

All you need is this bible -… – Job Oct 15 '12 at 3:09
While not what you are asking for, the list in is pretty good. – NoChance Oct 15 '12 at 4:35
up vote 5 down vote accepted

Try the Stony Brook Algorithm Repository.

Note SB repository really categorizes problems rather than algorithms.

For an example of particular algorithm description, take a look at 1.1.1 Dictionaries.

Of the fields you listed, the following are there, some under different names:

  • Algorithm Name: name is provided as a section header.
  • Problem
  • Description: "Excerpt from The Algorithm Design Manual"
  • Implementation: "Implementations"
  • Similar Algorithms: "Related Problems"

Only Big O Rating is not there. For Dictionaries section, this makes perfect sense since there is no single rating that would reasonably match different implementations.

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – gnat Oct 15 '12 at 6:17
@gnat While I agree in general, there's not much more to say about it. The OP asked for a Design Patterns-like catalog of algorithms, and I pointed to one. I suppose I could have included an image of one of the pages from the site (not so easy from a tablet), and I probably should have explained that the SB repository really categorizes problems rather than algorithms, but there's nothing I can do to convey or summarize the information at the linked site in this case. Feel free to edit if you can improve the answer. – Caleb Oct 15 '12 at 6:29
@gnat. Thank you for your efforts at moderation. Often answers that only contain a link need improvement. But did you read the question this time? How is it possible to answer this question other than by providing a link? Posting the whole algorithm catalogue as an answer? Stonybrook is excellent, +1. – MarkJ Oct 15 '12 at 7:11
@MarkJ have you seen changes done to answer in revision 2? Side note consider taking a look at MSO posts tagged link-only-answers – gnat Oct 15 '12 at 7:13
@gnat - excellent edit; it really rounded out the answer. – GlenH7 Oct 15 '12 at 14:46

NIST has operated a website called DADS (Dictionary of Algorithms and Data Structures) at

This web site is hosted by the Information Technology Laboratory of the National Institute of Standards and Technology, in collaboration with the FASTAR group.

This is a dictionary of algorithms, algorithmic techniques, data structures, archetypal problems, and related definitions. Algorithms include common functions, such as Ackermann's function. Problems include traveling salesman and Byzantine generals. Some entries have links to implementations and more information. Index pages list entries by area and by type. The two-level index has a total download 1/20 as big as this page...

We do not include algorithms particular to business data processing, communications, operating systems or distributed algorithms, programming languages, AI, graphics, or numerical analysis: it is tough enough covering "general" algorithms and data structures...

After more than a decade at NIST, this site will move to and be hosted by the FASTAR group...

share|improve this answer

This monstrosity might suit your needs if you can afford it. It includes basically everything you listed except for implementation. It's a proper CS text rather than a programming one per se.

share|improve this answer

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