Bubblesort of 23,56,78,53,11,65
Answers
Answered by
1
Answer:
23,56,78,53,11,65
Line 1:- 23,56,53,78,11,65
Line 2:- 23,56,53,11,78,65
Line 3:- 23,56,53,11,65,78
Line 4:- 23,53,56,11,65,78
Line 5:- 23,53,11,56,65,78
Line 6:- 23,11,53,56,65,78
Line 7:- 11,23,53,56,65,78 (Sorted)
Explanation:
Bubble sort starts with very first two elements, comparing them to check which one is greater.
Answered by
0
Answer:
23,56,78,53,11,65
Line 1:- 23,56,53,78,11,65
Line 2:- 23,56,53,11,78,65
Line 3:- 23,56,53,11,65,78
Line 4:- 23,53,56,11,65,78
Line 5:- 23,53,11,56,65,78
Line 6:- 23,11,53,56,65,78
Line 7:- 11,23,53,56,65,78 (Sorted)
Explanation:
- To determine which item is greater at the start of a bubble sort, the first two items are compared.
- Bubble Sort is the simplest sorting technique; if close components are sorted incorrectly, it continuously changes them. Due to its high average and worst-case time complexity, this method should not be employed with large data sets.
- The bubble sort is a quick method for arranging a series of numbers or other items in the correct order. Each group of adjacent components in the string is examined starting from the left, and if any are out of order, they are moved about.
#SPJ5
Similar questions