0% found this document useful (0 votes)
34 views23 pages

QuickSort Algorithm Overview and Code

Quicksort is a popular sorting algorithm that is often faster than others. It was developed by Charles Hoare and uses a divide and conquer approach. It picks a pivot element and partitions the array around it, recursively sorting the subarrays on each side until the entire array is sorted. There are different versions that pick the pivot element in various ways, such as always using the first, last, random or median element.

Uploaded by

Subhan Mûghåł
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views23 pages

QuickSort Algorithm Overview and Code

Quicksort is a popular sorting algorithm that is often faster than others. It was developed by Charles Hoare and uses a divide and conquer approach. It picks a pivot element and partitions the array around it, recursively sorting the subarrays on each side until the entire array is sorted. There are different versions that pick the pivot element in various ways, such as always using the first, last, random or median element.

Uploaded by

Subhan Mûghåł
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Name Roll No

Asher 36549
Abubakar 36565
Subhan 36577
Quicksort
 Quicksort is a popular sorting algorithm that is often
faster in practice compared to other
sorting algorithms.
 Itwas developed by Charles Antony Richard Hoare
(commonly known as C.A.R.
IMPORTANT POINTS

Like Merge Sort, QuickSort is a Divide and Conquer


algorithm. It picks an element as pivot and partitions the
given array around the picked pivot. There are many
different versions of quickSort that pick pivot in different
ways.

Always pick first element as pivot.


Always pick last element as pivot (implemented below)
Pick a random element as pivot.
Pick median as pivot.
Algorithm Of Quick Sort
Technique
C++ Code
 Code

You might also like