There are a number of solutions to this problem, known as sorting algorithms. There are several elementary and advanced sorting algorithms. Some sorting algorithms are simple and spontaneous, such as the bubble sort. Others, such as the quick sort are enormously complex, but produce super-fast results.