C Program to Implement Quick Sort
This is the C Program to sort an array using quicksort,it uses divide and conquer mechanism to sort the array

|
Visualization of the quicksort algorithm. The horizontal lines are pivot values.
|
|
| Class | Sorting algorithm |
|---|---|
| Worst case performance | O(n2) |
| Best case performance | O(n log n) (simple partition) or O(n) (three-way partition and equal keys) |
| Average case performance | O(n log n) |
| Worst case space complexity | O(n) auxiliary (naive) O(log n) auxiliary (Sedgewick 1978) |

[cc lang=”c”]
#include
main() { int i,j; printf(“ENTER THE NO”); scanf(“%d”,&n);
for(i=0;i
Recent Comments