Which of the following sorts is quickest when sorting the
following set: 1 2 3 5 4
1) Quick Sort
2) Bubble Sort
3) Merge Sort
Answer Posted / khushboo
BUbble sort
Quick Sort will take nlogn time and also merge sort
But bubble sort will take only O(n) as we can detect no
shift of position in first scan itself...
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Can a pointer be null?
What is the difference between malloc() and calloc() function in c language?
Can you define which header file to include at compile time?
How does normalization of huge pointer works?
What are the loops in c?
what value is returned to operating system after program execution?
Define the scope of static variables.
Can a void pointer point to a function?
What is strcpy() function?
What is c language used for?
How to get string length of given string in c?
Explain what happens if you free a pointer twice?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
What is spark map function?
What are pragmas and what are they good for?