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:

  1. Ascending
  2. Descending

Sorting Algorithm can be divided into 2:
  1. Internal Sorting
  2. External Sorting

There are 5 type of sorting:
  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort
  4. Quick Sort
  5. 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:
  1. 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.
  2. Binary Search
    This method works well for large arrays instead linear search.
  3. Interpolation Search
    A technique performed on the sorted data. This searching is similar with binary search.

Komentar

Postingan populer dari blog ini

Function and Recursion (28 November 2018)

File Processing (5 December 2018)