Computer Science · Algorithms
Which of the following sorting algorithms suits the given statements? Testbook + 1 Consider the total number of elements is n. Statement 1: Best case = zero swaps and n(n-1)/2 comparisons. Statement 2: Worst case = n(n-1)/2 swaps and n(n-1)/2 comparisons. Statement 3: In best and worst cases, it runs for a total of n-1 passes. Statement 4: In the first iteration, it sorts the highest element and for the next iterations sorts the next highest element.
- 1Quick sort
- 2Bubble sort✓
- 3Selection sort
- 4Insertion sort
Correct answer
Bubble sort
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