What's the fastest way to alphabetize your bookshelf?
Most people have the same problem to arrange thousand of books alphabetically. Although it seems complicated and it takes a dozen days, there are several methods could be conducted. Firstly, we can start to swap the book based on the alphabet, it means that you locate the book which has "A" alphabet in the first sequence, it is called as bubble sort. Secondly, you randomly choose a book which is located in the middle of books as a partition, after that divide the books into two groups which are separated by the partition, move the books to the right if their alphabets come before the partition and move the rest of them after it. This method is the fastest way which is called as quicksort.
Source: youtube
Most people have the same problem to arrange thousand of books alphabetically. Although it seems complicated and it takes a dozen days, there are several methods could be conducted. Firstly, we can start to swap the book based on the alphabet, it means that you locate the book which has "A" alphabet in the first sequence, it is called as bubble sort. Secondly, you randomly choose a book which is located in the middle of books as a partition, after that divide the books into two groups which are separated by the partition, move the books to the right if their alphabets come before the partition and move the rest of them after it. This method is the fastest way which is called as quicksort.
Source: youtube