Sorting and Searching (12 December 2018)
What is sorting?
An action to speed up searching operation in a list
Sorting can be done in 2 ways:
An action to speed up searching operation in a list
Sorting can be done in 2 ways:
- Ascending
- Descending
Sorting Algorithm can be divided into 2:
- Internal Sorting
- External Sorting
There are 5 type of sorting:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Quick Sort
- Merge Sort
What is searching?
A process to find and retrieve information based of a specific key value from some saved information. The key need to be unique because it's used to do record searching from a desired set of data list.
Searching divided into 3:
- Linear Search
Compares each element of the array with the search key. This method works well for a small or unsorted arrays, but not so efficient for large arrays. - Binary Search
This method works well for large arrays instead linear search. - Interpolation Search
A technique performed on the sorted data. This searching is similar with binary search.
Komentar
Posting Komentar