Which of the following sorting algorithms suit the given statements?

Consider the total number of elements are n.

Statement 1: Best case= zero swaps and n(n-1)/2  comparsions.

Statement 2: Worst case = n(n-1)/2 swaps and  n(n-1)/2 comparsions.

Statement 3: In best and worst cases total n-1 passes it runs.

Statement 4: In the first iteration it sorts the highest element and for the next iterations sorts the next highest element. 

1
Insertion sort 
2
selection sort
3
Bubble sort
4
All the above

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation