A sorting algorithm traverses through a list,
comparing adjacent elements and switching
them under certain conditions. What is this
sorting algorithm called?
OPTIONS
Insertion sort
Heap sort
Quick sort
bubble sort
Answers
Answered by
29
insertion sort. sorry mere ko explanation nahin aati
Answered by
10
The correct answer is bubble sort.
Explanation:
- A sorting algorithm traverses through a list, comparing adjacent elements and switching them under certain conditions.
- This sorting algorithm is called bubble sort.
- It is a simple sorting algorithm that repeatedly steps by using the list to be sorted, makes comparison in each pair of adjacent items and the, swaps them if they are in the wrong order.
- Hence, the correct answer is Bubble sort.
Similar questions