Tugas – Sorting and Searching

Sorting

  • Bubble Sort is what we put inside “for” statement

 

  • Selection Sort is a kind of sort we put from the smallest index to the biggest index

 

  • Insertion Sort is a kind of sort that finds the smallest by taking the first number and compare, and put it in the first if it is smaller than the number taken.
  • Quick Sort is a recursive function, somewhat a comparison sort
  • Merge Sort, using a “division” method

Searching

  • Linear Search, is checking each element in sequence until the element wanted is found.
  • Binary Search uses the same method as merge sort, but the difference is it is for searching.
  • Interpolation Search is the same as binary, but for a mass amount of data.

Leave a Reply

Your email address will not be published. Required fields are marked *