Chapter 9. SORTING ALGORITHMS

SORTING ALGORITHMS

Ruby is a wonderful language for many reasons, but even the best programming languages can be stifled by poor algorithms, improper data structures, or logic errors. Sorting is a fundamental programming skill you should definitely master. Whether you're sorting numbers, letters, or names, sorting algorithms can make or break your program's efficiency.

The performance of sorting algorithms is frequently measured using the Big O notation (pronounced "Big Oh"), a concept that comes from computational complexity theory. You can relax; we won't be going into computational complexity theory or proofs. Suffice it to say, Big ...

Get Wicked Cool Ruby Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.