You are on page 1of 23

10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

DSA for Beginners DSA Tutorial Data Structures Algorithms Array Strings Linked List Stack Queue Tree Graph Searching Sorting Recu

Write an Interview Experience


QuickSort – Data Structure and
QuickSort - Data Structure
and Algorithm Tutorials Algorithm Tutorials
Time and Space Complexity Read Discuss(170+) Courses Practice Video
Analysis of Quick Sort

Application and uses of QuickSort is a sorting algorithm based on the Divide and
Quicksort Conquer algorithm that picks an element as a pivot and
partitions the given array around the picked pivot by
QuickSort using different
languages placing the pivot in its correct position in the sorted array.

Iterative QuickSort

Different implementations
How does QuickSort work?
of QuickSort
The key process in quickSort is a partition(). The target of
Visualization of QuickSort
partitions is to place the pivot (any element can be chosen
to be a pivot) at its correct position in the sorted array and
Partitions in QuickSort
put all smaller elements to the left of the pivot, and all
Some problems on greater elements to the right of the pivot.
QuickSort
Partition is done recursively on each side of the pivot after
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and Got It !
the pivot isourplaced
understood in its& Privacy
Cookie Policy correct position and this finally
Policy
sorts the array.
Skip to content
https://www.geeksforgeeks.org/quick-sort/ 1/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

How Quicksort works

Choice of Pivot:

There are many different choices for picking pivots.

Always pick the first element as a pivot.


Always pick the last element as a pivot (implemented below)
Pick a random element as a pivot.
Pick the middle as the pivot.

Partition Algorithm:

The logic is simple, we start from the leftmost element and


keep track of the index of smaller (or equal) elements as i.
While traversing, if we find a smaller element, we swap
the current element with arr[i]. Otherwise, we ignore the
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
current element.
understood our Cookie Policy & Privacy Policy

Skip to content
https://www.geeksforgeeks.org/quick-sort/ 2/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

Let us understand the working of partition and the Quick Sort


algorithm with the help of the following example:

Consider: arr[] = {10, 80, 30, 90, 40}.

Compare 10 with the pivot and as it is less than pivot


arrange it accrodingly.

Partition in QuickSort: Compare pivot with 10

Compare 80 with the pivot. It is greater than pivot.

Partition in QuickSort: Compare pivot with 80

Compare 30 with pivot. It is less than pivot so arrange it


We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
accordingly.
understood our Cookie Policy & Privacy Policy

Skip to content
https://www.geeksforgeeks.org/quick-sort/ 3/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

Partition in QuickSort: Compare pivot with 30

Compare 90 with the pivot. It is greater than the pivot.

Partition in QuickSort: Compare pivot with 90

Arrange the pivot in its correct position.

We use cookies to ensure you have the best browsing experience on in


Partition ourQuickSort:
website. By using
Place our in
pivot site,
itsyou acknowledge
correct position that you have read and
understood our Cookie Policy & Privacy Policy

Skip to content
https://www.geeksforgeeks.org/quick-sort/ 4/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

Illustration of Quicksort:

As the partition process is done recursively, it keeps on putting


the pivot in its actual position in the sorted array. Repeatedly
putting pivots in their actual position makes the array sorted.

Follow the below images to understand how the recursive


implementation of the partition algorithm helps to sort the array.

Initial partition on the main array:

Quicksort: Performing the partition

Partitioning of the subarrays:

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
Quicksort: Performing the partition
understood our Cookie Policy & Privacy Policy

Skip to content
https://www.geeksforgeeks.org/quick-sort/ 5/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

Code implementation of the Quick Sort:


C++

#include <bits/stdc++.h>
using namespace std;

int partition(int arr[],int low,int high)


{
//choose the pivot

int pivot=arr[high];
//Index of smaller element and Indicate
//the right position of pivot found so far
int i=(low-1);

for(int j=low;j<=high;j++)
{
//If current element is smaller than the pivot
if(arr[j]<pivot)
{
//Increment index of smaller element
i++;
swap(arr[i],arr[j]);
}
}
swap(arr[i+1],arr[high]);
return (i+1);
}

// The Quicksort function Implement

void quickSort(int arr[],int low,int high)


{
We use cookies to ensure you have the best browsing
//experience
when low on our
iswebsite.
less By usinghigh
than our site, you acknowledge that you have read and
understood our Cookie
if(low<high) Policy & Privacy Policy

{
// pi is the partition Skip to content
return index of pivot
https://www.geeksforgeeks.org/quick-sort/ 6/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

int pi=partition(arr,low,high);

//Recursion Call
//smaller element than pivot goes left and
//higher element goes right
quickSort(arr,low,pi-1);
quickSort(arr,pi+1,high);
}
}

int main() {
int arr[]={10,7,8,9,1,5};
int n=sizeof(arr)/sizeof(arr[0]);
// Function call
quickSort(arr,0,n-1);
//Print the sorted array
cout<<"Sorted Array\n";
for(int i=0;i<n;i++)
{
cout<<arr[i]<<" ";
}
return 0;
}
// This Code is Contributed By Diwakar Jha

Java

// Java implementation of QuickSort


import java.io.*;

class GFG {

We use cookies to ensure you have the best browsing experience on our website.
// A utility functionBy using
toourswap
site, you
twoacknowledge
elements that you have read and
understood our Cookie Policy & Privacy Policy
static void swap(int[] arr, int i, int j)
{
Skip to content
int temp = arr[i];
https://www.geeksforgeeks.org/quick-sort/ 7/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

arr[i] = arr[j];
arr[j] = temp;
}

// This function takes last element as pivot,


// places the pivot element at its correct position
// in sorted array, and places all smaller to left
// of pivot and all greater elements to right of pivo
static int partition(int[] arr, int low, int high)
{
// Choosing the pivot
int pivot = arr[high];

// Index of smaller element and indicates


// the right position of pivot found so far
int i = (low - 1);

for (int j = low; j <= high - 1; j++) {

// If current element is smaller than the piv


if (arr[j] < pivot) {

// Increment index of smaller element


i++;
swap(arr, i, j);
}
}
swap(arr, i + 1, high);
return (i + 1);
}

// The main function that implements QuickSort


// arr[] --> Array to be sorted,
// low --> Starting index,
// high --> Ending index
static void quickSort(int[] arr, int low, int high)
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
{
understood our Cookie Policy & Privacy Policy
if (low < high) {

Skip to content
https://www.geeksforgeeks.org/quick-sort/ 8/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

// pi is partitioning index, arr[p]


// is now at right place
int pi = partition(arr, low, high);

// Separately sort elements before


// partition and after partition
quickSort(arr, low, pi - 1);
quickSort(arr, pi + 1, high);
}
}
// To print sorted array
public static void printArr(int[] arr)
{
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i] + " ");
}
}

// Driver Code
public static void main(String[] args)
{
int[] arr = { 10, 7, 8, 9, 1, 5 };
int N = arr.length;

// Function call
quickSort(arr, 0, N - 1);
System.out.println("Sorted array:");
printArr(arr);
}
}

// This code is contributed by Ayush Choudhary


// Improved by Ajay Virmoti

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
Python3understood our Cookie Policy & Privacy Policy

# Python3 implementation
Skip toof QuickSort
content
https://www.geeksforgeeks.org/quick-sort/ 9/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

# Function to find the partition position


def partition(array, low, high):

# Choose the rightmost element as pivot


pivot = array[high]

# Pointer for greater element


i = low - 1

# Traverse through all elements


# compare each element with pivot
for j in range(low, high):
if array[j] <= pivot:

# If element smaller than pivot is found


# swap it with the greater element pointed by
i = i + 1

# Swapping element at i with element at j


(array[i], array[j]) = (array[j], array[i])

# Swap the pivot element with


# the greater element specified by i
(array[i + 1], array[high]) = (array[high], array[i +

# Return the position from where partition is done


return i + 1

# Function to perform quicksort


def quicksort(array, low, high):
if low < high:

# Find pivot element such that


We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
# element smaller than pivot are on the left
understood our Cookie Policy & Privacy Policy
# element greater than pivot are on the right
pi = partition(array, low, high)
Skip to content
https://www.geeksforgeeks.org/quick-sort/ 10/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

# Recursive call on the left of pivot


quicksort(array, low, pi - 1)

# Recursive call on the right of pivot


quicksort(array, pi + 1, high)

# Driver code
if __name__ == '__main__':
array = [10, 7, 8, 9, 1, 5]
N = len(array)

# Function call
quicksort(array, 0, N - 1)
print('Sorted array:')
for x in array:
print(x, end=" ")

# This code is contributed by Adnan Aliakbar

C#

// C# implementation of QuickSort

using System;

class GFG {

// A utility function to swap two elements


static void swap(int[] arr, int i, int j)
{
int temp = arr[i];
arr[i]
We use cookies to ensure you have the best browsing experience on our=website.
arr[j]; By using our site, you acknowledge that you have read and
understood our Cookie Policy
arr[j] & Privacy Policy
= temp;
}
Skip to content
https://www.geeksforgeeks.org/quick-sort/ 11/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

// This function takes last element as pivot,


// places the pivot element at its correct position
// in sorted array, and places all smaller to left
// of pivot and all greater elements to right of pivo
static int partition(int[] arr, int low, int high)
{
// Choosing the pivot
int pivot = arr[high];

// Index of smaller element and indicates


// the right position of pivot found so far
int i = (low - 1);

for (int j = low; j <= high - 1; j++) {

// If current element is smaller than the piv


if (arr[j] < pivot) {

// Increment index of smaller element


i++;
swap(arr, i, j);
}
}
swap(arr, i + 1, high);
return (i + 1);
}

// The main function that implements QuickSort


// arr[] --> Array to be sorted,
// low --> Starting index,
// high --> Ending index
static void quickSort(int[] arr, int low, int high)
{
if (low < high) {

// pi is partitioning index, arr[p]


We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
// Policy
understood our Cookie is now at right
& Privacy Policy place
int pi = partition(arr, low, high);

Skip to content
https://www.geeksforgeeks.org/quick-sort/ 12/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

// Separately sort elements before


// and after partition index
quickSort(arr, low, pi - 1);
quickSort(arr, pi + 1, high);
}
}

// Driver Code
public static void Main()
{
int[] arr = { 10, 7, 8, 9, 1, 5 };
int N = arr.Length;

// Function call
quickSort(arr, 0, N - 1);
Console.WriteLine("Sorted array:");
for (int i = 0; i < N; i++)
Console.Write(arr[i] + " ");
}
}

// This code is contributed by gfgking

Javascript

// Function to partition the array and return the partiti


function partition(arr, low, high) {
// Choosing the pivot
let pivot = arr[high];

// Index of smaller element and indicates the right p


let i = low - 1;

We use cookies to ensure you have the best browsing experience


for (leton jour=website.
low; By j using our site,
<= high - you
1;acknowledge
j++) { that you have read and
understood our Cookie Policy & Privacy Policy
// If current element is smaller than the pivot
if (arr[j] < pivot) {
// Increment
Skip toindex of smaller element
content
https://www.geeksforgeeks.org/quick-sort/ 13/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

i++;
[arr[i], arr[j]] = [arr[j], arr[i]]; // Swap
}
}

[arr[i + 1], arr[high]] = [arr[high], arr[i + 1]]; //


return i + 1; // Return the partition index
}

// The main function that implements QuickSort


function quickSort(arr, low, high) {
if (low < high) {
// pi is the partitioning index, arr[pi] is now a
let pi = partition(arr, low, high);

// Separately sort elements before partition and


quickSort(arr, low, pi - 1);
quickSort(arr, pi + 1, high);
}
}

// Driver code
let arr = [10, 7, 8, 9, 1, 5];
let N = arr.length;

// Function call
quickSort(arr, 0, N - 1);
console.log("Sorted array:");
console.log(arr.join(" "));

PHP

<?php
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
understood
// our
ThisCookie Policy & Privacy
Function takesPolicy
place last element as pivot
// Place the pivot as correct position
// In Sorted Array, and places all smaller to left
Skip to content
https://www.geeksforgeeks.org/quick-sort/ 14/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

// of pivot and all greater element to its right of

function partition(&$arr,$low,$high)
{
// Choose the Pivot Element
$pivot= $arr[$high];

// Index of smaller element and indicates


// The right position of pivot
$i=($low-1);

for($j=$low;$j<=$high-1;$j++)
{
if($arr[$j]<$pivot)
{
// Increment index of smaller element
$i++;
list($arr[$i],$arr[$j])=array($arr[$j],$arr[$i]);
}
}
// Pivot element as correct position
list($arr[$i+1],$arr[$high])=array($arr[$high],$arr[$
return ($i+1);
}

// The main function that implement as QuickSort


// arr[]:- Array to be sorted
// low:- Starting Index
//high:- Ending Index

function quickSort(&$arr,$low,$high)
{
if($low<$high)
{
// pi is partition
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
$pi=
understood ourpartition($arr,$low,$high);
Cookie Policy & Privacy Policy
// Sort the array
// Before the partition of Element
Skip to content
https://www.geeksforgeeks.org/quick-sort/ 15/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

quickSort($arr,$low,$pi-1);

// After the partition Element

quickSort($arr,$pi+1,$high);
}
}

// Driver Code

$arr= array(10,7,8,9,1,5);
$N=count($arr);

// Function Call

quickSort($arr,0,$N-1);
echo "Sorted Array:\n";

for($i=0;$i<$N;$i++)
{
echo $arr[$i]. " ";
}
//This code is contributed by Diwakar Jha
?>

Output

Sorted array:
1 5 7 8 9 10

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
understood our Cookie Policy & Privacy Policy

Skip to content
https://www.geeksforgeeks.org/quick-sort/ 16/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

Complexity Analysis of Quick Sort:

Time Complexity:

Best Case: Ω (N log (N))


The best-case scenario for quicksort occur when the pivot
chosen at the each step divides the array into roughly equal
halves.
In this case, the algorithm will make balanced partitions,
leading to efficient Sorting.
Average Case: θ ( N log (N))
Quicksort’s average-case performance is usually very good in
practice, making it one of the fastest sorting Algorithm.
Worst Case: O(N2)
The worst-case Scenario for Quicksort occur when the pivot at
each step consistently results in highly unbalanced partitions.
When the array is already sorted and the pivot is always
chosen as the smallest or largest element. To mitigate the
worst-case Scenario, various techniques are used such as
choosing a good pivot (e.g., median of three) and using
Randomized algorithm (Randomized Quicksort ) to shuffle the
element before sorting.
Auxiliary Space: O(1), if we don’t consider the recursive stack
space. If we consider the recursive stack space then, in the
worst case quicksort could make O(N).

Advantages of Quick Sort:


We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
understood our Cookie Policy & Privacy Policy
It is a divide-and-conquer algorithm that makes it easier to
solve problems. Skip to content
https://www.geeksforgeeks.org/quick-sort/ 17/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

It is efficient on large data sets.


It has a low overhead, as it only requires a small amount of
memory to function.

Disadvantages of Quick Sort:


It has a worst-case time complexity of O(N2), which occurs
when the pivot is chosen poorly.
It is not a good choice for small data sets.
It is not a stable sort, meaning that if two elements have the
same key, their relative order will not be preserved in the
sorted output in case of quick sort, because here we are
swapping elements according to the pivot’s position (without
considering their original positions).

Feeling lost in the world of random DSA topics, wasting time


without progress? It's time for a change! Join our DSA course,
where we'll guide you on an exciting journey to master DSA
efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our
DSA course, trusted by over 100,000 geeks!
DSA in C++
DSA in Java
DSA in Python
DSA in JavaScript
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
understood our Cookie Policy & Privacy Policy

Last Updated : 16 Oct, 2023 Skip to content 769


https://www.geeksforgeeks.org/quick-sort/ 18/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

Recommended Problem

Quick Sort Solve Problem


Divide and Conquer Sorting +1 more

VMWare Amazon +11 more Submission count:


1.7L

Similar Reads
Generic Static Data
Implementation of Structure vs
QuickSort… Dynamic Data…

Application and When does the


uses of Quicksort worst case of
Quicksort occur?

QuickSort on QuickSort on
Doubly Linked List Singly Linked List

3-Way QuickSort QuickSort Tail Call


(Dutch National Optimization
Flag) (Reducing worst…

Why quicksort is C++ Program for


better than QuickSort
mergesort ?

Related Tutorials
Mathematical and Learn Data
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and

Geometric
understood our Cookie Policy & Privacy Policy
Structures with
Algorithms - Dat… Javascript | DSA…
Skip to content
https://www.geeksforgeeks.org/quick-sort/ 19/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

Introduction to Introduction to Set


Max-Heap – Data – Data Structure
Structure and… and Algorithm…

Introduction to
Map – Data
Structure and…

Next

Time and Space Complexity


Analysis of Quick Sort

Article Contributed By :

GeeksforGeeks

Vote for difficulty


Current difficulty : Medium

Easy Normal Medium Hard Expert

Improved By : shikhar, Palak Jain 5, RishabhPrabhu,


lakshaygupta2807, UditChaudhary, rathbhupendra,
ays14, devi_johns, dhavaldhavalb588, code_ayush,
gfgking, adnanaliakbar99, sreenivasulureddyk19,
animeshdey, saurabhaniket2903, shreyasnaphad,
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
diwakarjha,
understood our Cookie kashishkumar2,
Policy & Privacy Policy harendrakumar123,
yatinpandit, navyan17xv, abgupta_18, dakshdictef,
saiyam99b1mq, Skip tomanishk4514,
content ajayvirmoti,
https://www.geeksforgeeks.org/quick-sort/ 20/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

mridul_gfg, paras_tiwari_gfg, srije73z2


Article Tags : Adobe , Goldman Sachs , HSBC , Qualcomm ,
Quick Sort , Samsung , SAP Labs , Target Corporation ,
Divide and Conquer , DSA , Sorting
Practice Tags : Adobe, Goldman Sachs, HSBC, Qualcomm,
Samsung, SAP Labs, Target Corporation,
Divide and Conquer, Sorting

Improve Article Report Issue

Company Explore Languages DSA DSA Web


A-143, 9th Floor, Sovereign Corporate About Us Job-A-Thon Python Concepts Roadmaps Development
Tower, Sector-136, Noida, Uttar Pradesh - Hiring Data Structures DSA for HTML
201305 Legal Java
Challenge Beginners
feedback@geeksforgeeks.org Careers C++ Arrays CSS
Hack-A-Thon Basic DSA
In Media PHP Strings JavaScript
GfG Weekly Coding
Contact Us GoLang Linked List Bootstrap
Contest Problems
Advertise with SQL Algorithms ReactJS
Offline Classes DSA Roadmap
us R Language Searching AngularJS
(Delhi/NCR) by Sandeep
Placement Android Sorting Jain NodeJS
DSA in
Training Tutorial
JAVA/C++ Mathematical DSA with Express.js
Program
Master System Dynamic JavaScript Lodash
Design Programming Top 100 DSA
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
MasterPolicy
understood our Cookie Policy & Privacy CP Interview
Problems
Skip to content
https://www.geeksforgeeks.org/quick-sort/ 21/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

All Cheat
Sheets

Computer Python Data DevOps Competitive System


Science Python Science & Git Programming Design
GATE CS Notes Programming ML AWS Top DSA for CP What is System
Examples Design
Operating Data Science Docker Top 50 Tree
Systems Django Tutorial With Python Problems Monolithic and
Kubernetes
Computer Python Projects Data Science Top 50 Graph Distributed SD
Azure
Network Python Tkinter For Beginner Problems Scalability in
GCP
Database OpenCV Python Machine Top 50 Array SD
Management Tutorial Learning Problems Databases in
System Python Tutorial Top 50 String SD
Software Interview Maths For Problems High Level
Engineering Question Machine Top 50 DP Design or HLD
Digital Logic Learning Problems Low Level
Design Pandas Tutorial Top 15 Design or LLD
Engineering NumPy Tutorial Websites for CP Top SD
Maths NLP Tutorial Interview
Questions
Deep Learning
Tutorial

Interview GfG School Commerce UPSC SSC/ Write & Earn


Corner CBSE Notes for Accountancy Polity Notes BANKING Write an Article
Company Wise Class 8 Business Geography SSC CGL Improve an
Preparation
We use cookies to ensure you have the best browsing experience on our website.CBSE Notes
By using our for
site, youStudies
acknowledge that you Notes
have read and Syllabus Article
understood our Cookie Policy & Privacy Policy
Preparation for Class 9 Economics History Notes SBI PO Syllabus Pick Topics to
SDE Skip to content Write
https://www.geeksforgeeks.org/quick-sort/ 22/23
10/18/23, 11:54 PM QuickSort - Data Structure and Algorithm Tutorials - GeeksforGeeks

Experienced CBSE Notes for Human Science and SBI Clerk Write Interview
Interviews Class 10 Resource Technology Syllabus Experience
Internship CBSE Notes for Management Notes IBPS PO Internships
Interviews Class 11 (HRM) Economics Syllabus
Competitive CBSE Notes for Management Notes IBPS Clerk
Programming Class 12 Income Tax Important Syllabus
Aptitude English Finance Topics in Ethics Aptitude
Preparation Grammar Statistics for UPSC Previous Questions
Economics Year Papers SSC CGL
Practice Papers

@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and
understood our Cookie Policy & Privacy Policy

https://www.geeksforgeeks.org/quick-sort/ 23/23

You might also like