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

Can we compile a program without main() function?

1131


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

2189


What is meant by realloc()?

1160


Define and explain about ! Operator?

1003


How are strings stored in c?

1021


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1099


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2809


What is keyword with example?

1070


Can we increase size of array in c?

971


how to find anagram without using string functions using only loops in c programming

3196


What are the valid places to have keyword “break”?

1091


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3730


Compare array data type to pointer data type

1041


Why is c called c not d or e?

1102


What does node * mean?

1240