Quick Sort : Sorting Random Numbers with Quick Sort (Mengurutkan Bilangan Acak dengan Quick Sort)
Quicksort is a divide and conquer algorithms. Quicksort first big divide the list into two sub-lists are smaller, low and high elements. Quicksort can then recursively sort the sub-list.
These steps are :
- Select an element, called a pivot, from the list.
- Then list all elements with values less than the pivot moved before or left side of pivote, while all elements with value greater than the pivot moved to the right of the pivot. This is called the partition operation.
- Recursively sort the list of sub-elements that are smaller and sub-list elements is greater.
How it works sort the numbers with the Quick Sort is as follows:
For a complete program that can be tried can be downloaded at here
Java-language programs. In order to be executed in Jeliot (Java Eliot).
Jadilah yang pertama mengomentari
Post a Comment