際際滷

際際滷Share a Scribd company logo
Quicksort
 Quicksort is a popular sorting algorithm that is often
faster in practice compared to other sorting algorithms.
 It was developed by Charles Antony Richard Hoare
(commonly known as C.A.R.
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.
IMPORTANT POINTS
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
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Technique
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
Quicksort ALGORITHM
C++ Code
 Code

More Related Content

Quicksort ALGORITHM

  • 1. Quicksort Quicksort is a popular sorting algorithm that is often faster in practice compared to other sorting algorithms. It was developed by Charles Antony Richard Hoare (commonly known as C.A.R.
  • 2. 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. IMPORTANT POINTS Always pick first element as pivot. Always pick last element as pivot (implemented below) Pick a random element as pivot. Pick median as pivot.