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
Explain how do you override a defined macro?
Explain what are the different data types in c?
what is the basis for selection of arrays or pointers as data structure in a program
Explain how do you convert strings to numbers in c?
explain what is a newline escape sequence?
I need testPalindrome and removeSpace
#include
What are the features of c language?
What is nested structure?
Explain what is the difference between #include and #include 'file' ?
In which language linux is written?
Explain how do you sort filenames in a directory?
What is malloc and calloc?
What is the significance of an algorithm to C programming?
What are data structures in c and how to use them?
What is volatile c?