Question
Data Science and Artificial Intelligence Question on Sorting
Which algorithm sort the array in exactly using 2 swap [4,3,2,1,5]?
A
Selection sort
B
Insertion sort
C
Bubble sort
Answer
Bubble sort
Explanation
Solution
The correct answer is option (C): Bubble sort.