What's the fastest way to alphabetize your bookshelf? - Chand John
View full lesson: http://ed.ted.com/lessons/what-s-the-fastest-way-to-alphabetize-your-bookshelf-chand-john You work at the college library. You're in the middle of a quiet afternoon when...
========== You work at the college library. You're in the middle of a quiet afternoon when suddenly a shipment of 1,280
different books arrives. The books have been dropped of
in one long straight line, but they're all out of order, and the automatic sorting
system is broken. To make matters worse,
classes start tomorrow, which means that
first thing in the morning, students will show up in droves
looking for these books. How can you get them all sorted in time? One way would be to start at one end
of the line with the first pair of books. If the first two books are in order,
then leave them as they are. Otherwise, swap them. Then, look at the second and third books, repeat the process, and continue until you reach
the end of the line. At some point, yo...