Does anyone know what is the name of this sorting algorithm?

Does anyone know what is the name of this sorting algorithm? I don’t remember the name.

def sort(lst):
  for i in range(len(lst)):
    current_min = i
    for j in range(i, len(lst)):
      if lst[j] < lst[current_min]:
        current_min = j
    lst[current_min], lst[i] = lst[i], lst[current_min]

That looks like a bubble sort.

1 Like