What are the average number of comparisons required to sort
3 elements?

Answers were Sorted based on User's Feedback



What are the average number of comparisons required to sort 3 elements?..

Answer / jaiprakash

n(n-1)/2(bubble sort)
n=3
(3*2)/2=3(n)

ans:n

Is This Answer Correct ?    13 Yes 1 No

What are the average number of comparisons required to sort 3 elements?..

Answer / hell2heaven

I think answer is 3.is it right?

Is This Answer Correct ?    12 Yes 1 No

Post New Answer

More C Interview Questions

what do you mean by enumeration constant?

0 Answers  


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

0 Answers  


4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it. i have done maximum par but i m findind problem in the commented area. please help...

3 Answers  


write a code for large nos multilication (upto 200 digits)

2 Answers   Persistent,


What is c value paradox explain?

0 Answers  






What are the Advantages of using macro

0 Answers  


what is the difference between #include<stdio.h> and #include "stdio.h" ?

3 Answers  


How do you list a file’s date and time?

0 Answers  


What is a void pointer in c?

0 Answers  


Is there a way to compare two structure variables?

0 Answers  


What are the disadvantages of a shell structure?

0 Answers  


What is the difference between struct and typedef struct in c?

0 Answers  


Categories