Computer Science · Algorithms
The following integers are to be sorted in ascending order using bubble sort: 5, 8, 22, 18, 1 Following are the intermediate results of various passes during the sorting process: (A) 5, 1, 8, 18, 22 (B) 1, 5, 8, 18, 22 (C) 5, 8, 18, 1, 22 (D) 5, 8, 1, 18, 22 Choose the correct sequence of passes from first to last.
- 1(C), (D), (B), (A)
- 2(C), (D), (A), (B)✓
- 3(D), (C), (A), (B)
- 4(D), (C), (B), (A)
Correct answer
(C), (D), (A), (B)
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Algorithms?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Algorithms