Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / jaiprakash

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

ans:n

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between union All statement and Union?

1126


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4283


what do u mean by Direct access files? then can u explain about Direct Access Files?

2104


What is volatile variable how do you declare it?

1118


What is character constants?

1197


Which driver is a pure java driver

1632


What is dangling pointer in c?

1256


If fflush wont work, what can I use to flush input?

1115


How do you determine the length of a string value that was stored in a variable?

1135


Subtract Two Number Without Using Subtraction Operator

864


`write a program to display the recomended action depends on a color of trafic light using nested if statments

2143


How do you print an address?

1280


What is the use of pointers in C?

1096


What is the difference between array and structure in c?

1186


What are the complete rules for header file searching?

1101