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
Can we compile a program without main() function?
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.
What is meant by realloc()?
Define and explain about ! Operator?
How are strings stored in c?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
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
What is keyword with example?
Can we increase size of array in c?
how to find anagram without using string functions using only loops in c programming
What are the valid places to have keyword “break”?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
Compare array data type to pointer data type
Why is c called c not d or e?
What does node * mean?