### Sort the Data Structure

Sort the data sorting process that previously arranged randomly, so be arranged on a regular basis according to a specific rule.In general there are 2 types of Sort / sequencing:. Ascending (Up). Descending (Decrease)Data Ordering example:. Random Data: 5 6 8 1 3 25 10. Ascending Ascending: 1 3 5 6 8 10 25. Ascending Descending: 25 10 8 6 5 3 1

Sort Method / Ordering DataTo make the ordering process can be used many different ways /methods. Some methods include:. Buble / Exchange Sort. Selection Sort. Insertion Sort. Quick SortBubble / Exchange Sort ) dari elemen berikutnya, maka tukar Proses Pengurutan Data paling akhir dibandingkan dengan data di depannya, jika ternyata lebih kecil maka tukar.

" onmouseover="this.style.backgroundColor='#ebeff9'" onmouseout="this.style.backgroundColor='#fff'">

Moving elements are present with the following elements, if the element is now greater than (>) from the next element, then the exchange process at the end of Ordering Data compared to the data in front of him, if it is smaller then the exchange rate. And the same checks performed on data subsequent to the initial data.

Selection Sort Comparing the current element with the next element until the last element. If you find another element that is smaller than the recorded elements position now and then exchanged. And so on.Insertion Sort Ordering is done by comparing the data to 1 (which starts from 1 to-2 data to final data) with the following data. If you found a smaller data so that data is inserted into the appropriate position should be.Quick Sort Comparing an element (called the pivot) with other elements and arranged them so that other elements are smaller than the pivot is located on the left and other elements are greater than the pivot is located on the right. And thus have formed two sublist, which is located on the left and right of pivot.Lalu the sublist left and right sublist we consider a new list and we do the same process as before. And so on until there is no longer sublist.So that has occurred inside Recursive process.

Info: