You work at the college library. You’re in the middle of a quiet afternoon when suddenly, a shipment of 1,280 books arrives. The books are in a straight line, but they’re all out of order, and the automatic sorting system is broken. How can you sort the books quickly?

Information can be sorted with a variety of algorithms, step-by-step procedures for solving a problem or accomplishing a goal. They can be used by librarians to sort books, by a search engine to return a relevant search result, and have endless other uses. TED Ed runs through a few common sorting algorithms in this video: Bubble Sort, Insertion Sort, and Quick Sort, which is fast because it utilizes a principle called divide-and-conquer:

The divide-and-conquer approach involves taking a large problem, such as the problem we saw in the video of sorting 1,280 books, and dividing it up into smaller and smaller sub-problems, and then solving those sub-problems in easier ways, leading to a solution to the original big problem. This is precisely what QuickSort does.

Next: More logic, plus The Writer, automata by Pierre Jaquet-Droz and Will YouTube Ever Run Out Of Video IDs?

See more videos about...