Sort the following list using the bubble sort algorithm as discussed in this chapter. Show the list after each iteration of the outer for loop. 46, 58, 16, 25, 83, 98, 8, 70, 5, 62
Is the answer:
46, 58, 16, 25, 83, 98, 8, 70, 5, 62
5, 46, 58, 16, 25, 83, 98, 8, 70, 62
5, 8, 46, 58, 16, 25, 83, 98, 62, 70
5, 8, 16, 46, 58, 25, 62, 83, 98, 70
5, 8, 16, 25, 46, 58, 62, 70, 83, 98

Answer :

Other Questions