1
4.6kviews
Write a C program to implement the quick sort algorithm.

Mumbai University > COMPS > Sem 3 > Data Structures

Marks: 8 M

Year: May 2014, May 2015

1 Answer
1
29views
  • The quick sort is a widely used algorithm which works on the principle of divide and conquer strategy to divide a single unsorted array into two smaller sub-arrays.
  • Here we select a pivot element and make sure that all the elements before the pivot in the array is less than it and elements after it are greater than the pivot.
  • Recursively sort these sub-arrays obtained
  • C-program:

enter image description here

Here is an illustration of quicksort

enter image description here

Please log in to add an answer.