answersLogoWhite

0


Best Answer

The order of qick sort at the best case is O(n log n)

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the complexity of quick sort?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why quick sort better than merge sort?

it has less complexity


Why quick sort is called quick?

Although quick sort has a worst case time complexity of O(n^2), but for sorting a large amount of numbers, quick sort is very efficient because of the concept of locality of reference.


How do you select pivot in quick sort?

quick sort has a best case time complexity of O(nlogn) and worst case time complexity of 0(n^2). the best case occurs when the pivot element choosen as the center or close to the center element of the list.the time complexity can be derived for this case as: t(n)=2*t(n/2)+n. whereas the worst case time complexity for quick sort happens when the pivot element is towards the end of the list.the time complexity for this can be derived using the recurrence eqn: t(n)=t(n-1)+n


What is the complexity of bucket sort?

o(n)


If quick sort and merge sort have same elements then what will be the complexity of both algorithms?

quicksort should be O(n^2), but merge sort should be O(nlogn). but if you can modify partition algorithm with checking all values same in array from p to r, it could be O(nlogn).


Divide-and-Conquer to sort numbers using quick sort?

Yes, that's how quick-sort works.


What is complex sort?

Time complexity Best case: The best case complexity of bubble sort is O(n). When sorting is not required, all the elements are already sorted. Average case: The average case complexity of bubble sort is O(n*n). It occurs when the elements are jumbled, neither properly ascending nor descending. Worst case: The worst-case complexity of bubble sort is O(n*n). It occurs when the array elements are needed to be sorted in reverse order. Space complexity In the bubble sort algorithm, space complexity is O(1) as an extra variable is needed for swapping.


18 A list is ordered from smaller to largest when a sort is called Which sort would take the longest time to execute?

Quick Sort


When quick sort is preferred?

When you want to sort an array.


Time and space complexities of various sorting methods?

Bubble sort-O(n*n)-in all cases Insertion sort-O(n*n)-in avg and worst case in best case it is O(logn) Quick Sort-0(nlogn)-in avg n best case and 0(n*n)-in Worst case selection sort-same as bubble Linear search-o(n) Binary Search-o(nlog) Any doubt mail me-jain88visionary@rediffmail.com


Is quick sort is an example of dynamic programming algorithm?

quick sort is a divide and conquer method , it is not dynamic programming


Which sort show the best average behavior?

quick sort