285 views
1 votes
1 votes

Given a sequence of numbers where numbers at odd positions as well as even positions are  sorted in increasing order. For example

1 42 3 44 6 45 9

Which of the following sorting algorithm performs the best here with respect to the number of comparisons performed?
 

  1. Insertion sort
  2. Bubble sort
  3. Selection sort
  4. Asymptotically all the above three have the same worst case performance

Please log in or register to answer this question.

Answer:

Related questions

1 votes
1 votes
0 answers
2
Arjun asked Jun 10, 2018
153 views
Consider the following C program?void mystery(int n){ if(n<=0) return; printf("%d", 0); mystery(n-1); mystery(n-2); } int main(){ int n=10; mystery(n); return 0; }The num...
1 votes
1 votes
1 answer
3
1 votes
1 votes
1 answer
4