how many sorts will the bubble sort algorithm do to sort the following array? (6, 3,1,4,2,5)
Answers
Answered by
2
Answer:
Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order. Example: First Pass: ( 5 1 4 2 8 ) –> ( 1 5 4 2 8 ), Here, algorithm compares the first two elements, and swaps since 5 > 1.
Explanation:
Similar questions
English,
1 month ago
Science,
1 month ago
Social Sciences,
3 months ago
Math,
3 months ago
Computer Science,
8 months ago
Science,
8 months ago
Social Sciences,
8 months ago