Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 777 Bytes

README.md

File metadata and controls

16 lines (13 loc) · 777 Bytes

####SortingAlgorithms

  1. Bubble Sort --Iterates through the entire array --Using an inner loop, whenever the current element is greater than next element, then both elements are swapped

  2. Insertion Sort --Iterates from second element to last element --Current element is marked as the Key element --Key is compared with previous elements and if it is smaller, then all elements are moved ahead and key is placed at correct position

  3. Selection Sort --Iterates through the entire array --Minimum index is placed initially at the first element of the array --Using an inner loop if any subsequent element is less then Minimum index element, then new minimum index is noted --The lowest element is found in the inner loop array is swapped to current position