I’m a self-taught developer and, quite frankly, am not all that great at figuring out which search or sort algorithm to use in any particular situation. I was just wondering if there was a Design Patterns-esque listing of the common algorithms available out there in the ether for me to bookmark. Something like:
Name of algorithm (with aliases, if any)
Problem it addresses
Big-O cost
Algorithm itself
Examples
Other algorithms it may be used with/substituted for
I’m just looking for a simple, concise listing of the algorithms I probably should know in one location. Is there anything like this available?
The web site http://www.sorting-algorithms.com/ shows many popular sorting algorithms, and describes their complexity and implementation. It goes the extra step to show, via animations, how those algorithms perform on different types of data (i.e pre-sorted, sparse, reverse-sorted, etc…).