What are the average number of comparisons required to sort
3 elements?
Answers were Sorted based on User's Feedback
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 is C++
why i join syntel?
23 Answers ABC, Syntel, TCS,
where does malloc() function get the memory?
If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",a[0]); return 1; } what will be the output?
what will be the output off the following program? #include<stdio.h> int main() { int a; a=015+0*71+5; printf("%d,a"); return0; }
What is a protocol in c?
write a c code "if you give a any decimal number then print that number in english alphabet"? ex: i/p: 552 o/p: five hundred fifty two ...
What is the use of function in c?
what is the output of below int n=10; (n++)++; printf("%d",n);
find out largest elemant of diagonalmatrix
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.
What is pass by reference in c?