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...

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 / prof.gagandeep jagdev

Quick Sort, Since the array is already sorted, so this can
be considered as Best case example. The complexity of quick
sort in best case is O(n log n). No doubt , same is the
complexity of Merge sort in best case, but Quick sort
enjoys priority over Merge Sort because Merge sort requires
extra memory( an array) to store the sorted result whereas
quick sort do not specify any such need.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pointers? Why are they used?

1248


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1947


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

2625


Where is c used?

1157


Can you subtract pointers from each other? Why would you?

1009


What is the difference between abs() and fabs() functions?

1182


in linking some of os executables are linking name some of them

2204


What are the scope of static variables?

1257


Whats s or c mean?

1087


What is the difference between array and pointer?

1085


Who is the founder of c language?

1227


What are the advantages of c language?

1155


differentiate built-in functions and user – defined functions.

1151


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

2049


Write the control statements in C language

1283