Find(array, size, key) for each item in the array if the item is equal to the key return position return SEARCH_NOT_FOUND
InsertionSort(array, size) for last = 1 to size i = last; tmp = array[last]; while i >= 1 and array[i-1] > tmp array[i] = array[i-1] i--; array[i] = tmp
SelectionSort(array, size) for current = 0 to size-1 do minPos = current for j = current+1 to size do if array[minPos] > array[j] minPos = j; if minPos != current Swap(array[minPos], array[current])