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’s the special use of UNIONS?

1111


What is the maximum no. of arguments that can be given in a command line in C.?

1089


What are the types of pointers?

1036


How many types of operators are there in c?

986


What are the types of bitwise operator?

1050


What is the explanation for cyclic nature of data types in c?

1144


Explain what is meant by 'bit masking'?

1123


How can a string be converted to a number?

968


Why cant I open a file by its explicit path?

991


why do some people write if(0 == x) instead of if(x == 0)?

1014


Why do we use c for the speed of light?

1106


Why use int main instead of void main?

1073


For what purpose null pointer used?

1015


What are identifiers c?

1024


How do you determine a file’s attributes?

1019