state gov UP Police Programmer Grade 2 Mock Test Series Algorithms Searching, Sorting and Hashing Sorting
Arrange the following items in ascending order using Bubble Sort. What is the intermediate sequence of 37, 54, 21, 85, 68, 12, 9, and 57 after the second pass?
1
21, 37, 12, 9, 54, 57, 68, 85
2
37, 21, 54, 68, 12, 9, 57, 85
3
21, 12, 9, 37, 54, 57, 68, 85
4
21, 37, 54, 12, 9, 57, 68, 85