Selection Sort

Selection Sort #

  • Algorithm

    • Point to the first cell.
    • Search through all the following items which one has the lowest value.
    • After having search through all the following items, swap the values from the pointed cell with the lowest value.
    • Move the pointer to the next cell on the right, start over again, (new passthrough starts)
  • Efficiency is O(N2 / 2), but as we ignore constants O(N2), so same as the bubble sort in worth case.