Which of the following sort algorithms is represented by the pseudocode?

for all elements of list

if list[i] > list[i+1]

swap(list[i], list[i+1])

end if

end for
(1 point)
Responses

selection sort
selection sort

bubble sort
bubble sort

quicksort
quicksort

merge sort

1 answer

The pseudocode you provided represents the bubble sort algorithm. In bubble sort, adjacent elements are compared and swapped if they are in the wrong order, allowing the largest unsorted element to "bubble up" to its correct position in each iteration. This process is repeated until the entire list is sorted.