You are on page 1of 2

Surigao State College of Technology

COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY


Surigao City

Submitted To:
Mrs. Theresita Toledo

Submitted By:
Landicho Ruzzel B.
Module 4: Sorting Techniques all best, average and worst cases. This
algorithm is used for small list, but replaced
Bubble Sort
by insertion sort [8]. Selection sort uses
The basic sorting algorithm is bubble more comparisons but less amount of data
sort. It compares two adjacent elements moving, since if data set has less key but
and do swap operation if there is miss order large data sharing then Selection is sort is
found with repeated steps. This is also best.
called a comparison sorting algorithm. The
Quick Sort
original bubble sort does more iteration
even if the data set is sorted. The Quick sort is a divide and conqueror
complexity of bubble sort is O (n2) for all algorithm uses recursion to sort the data. It
cases e.g. best case, worst case, and is also called a comparison sort developed
average case. For this bubble sort is used by Tony Hoar. It uses a programmer
only for small number of data set, for large selected pivot to sort the data list. Quick
and average data sets this algorithm is Sort Algorithm is divided into two parts: the
impractical. first part is a procedure QUICK to use the
reduction steps of the algorithm, while
Insertion sort
second part uses the QUICK procedure to
Algorithm is a simple and mostly sort the elements in the array list.
used algorithm for small and mostly sorted
Merge Sort
arrays lists. This algorithm uses two same
size array lists: one is sorted and one is This is also a divide and conqueror
unsorted. In each step of sorting a algorithm, with advantage of ease of
minimum element is found at unsorted list merging lists with new sorted lists. The
and placed it to the sorted list at its proper worst case complexity of merge sort since
location. This algorithm uses two arrays could be used for large and worst data sets.
since more memory is used, also more time Merge sort uses the following three steps to
consuming to find minimum element and sort a array list
copy it to new sorted array. This algorithm
1. Divide: if size of array is greater than
is relatively used for small and average data
1, then split it into two equal half
sets in place of bubble and selection sort
size sub arrays.
algorithms. Insertion Sort algorithm is twice
2. Conquer: sort both sub arrays by
faster than bubble sort algorithm.
recursion.
Selection Sort 3. Merging: Combine both sorted sub
arrays into original size array. This
This algorithm is the improved
will gives a complete sorted array.
version of bubble sort and thus one of the
simplest types of sorting algorithms.
Selection Sort is a comparison sorting
algorithm. This algorithm search the
minimum element in the unsorted array or
list and swap it to the first unsorted array
location, with repeated iteration steps. This
algorithm takes more time in finding
minimum element in the array list. The
complexity of selection sort algorithm is for

You might also like