June 2017
Beginner
330 pages
7h 30m
English
Quick sort, on the other hand, is a much faster sorting algorithm compared to bubble sort because it uses the concept of divide and conquer. This algorithm picks a pivot point and divides the entire list into two groups: one that's below the pivot point and one that's greater than the pivot. It continues to break the collection into smaller and smaller chunks.
It is an efficient algorithm because it sorts values very fast and breaks the entire value set into more manageable pieces. Due to these reasons, quick sort is one of the most widely used sorting algorithm out there, and most people like to use it in their code. Also, the Ruby sort method that we used earlier uses the quick sort algorithm to rearrange values.
Read now
Unlock full access