0% found this document useful (0 votes)
9 views11 pages

Quick Sort Algorithm Presentation

The document presents a presentation on Quick Sort, a sorting algorithm based on the Divide and Conquer principle. It explains the algorithm's process of selecting a pivot and partitioning the array around it. The document includes an algorithm outline and an example to illustrate the sorting method.

Uploaded by

kandivarshitha9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views11 pages

Quick Sort Algorithm Presentation

The document presents a presentation on Quick Sort, a sorting algorithm based on the Divide and Conquer principle. It explains the algorithm's process of selecting a pivot and partitioning the array around it. The document includes an algorithm outline and an example to illustrate the sorting method.

Uploaded by

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

TALLA PADMAVATHI COLLEGE OF ENGINEERING

AUTONOMOUS

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


3rd year 1 semester
Presented By
Thakur Rishitha singh
23UC1A0528

Presentation on
Design And Analysis Of Algorithms

Quick Sort
Faculty Head of the department
Ms. N. Sandhya Ms. J. Shilpa
1

Index

Introduction

Algorithm

Example
2
Introduction
 QuickSort is a sorting algorithm based on the Divide and Conquer that picks an
element as a pivot and partitions the given array around the picked pivot by placing
the pivot in its correct position in the sorted array.
 It works on the principle of divide and conquer, breaking down the problem into
smaller sub-problems.

Algorithm
Algorithm QUICKSORT(A, low, high) {
if low < high {
p = PARTITION(A, low, high)
QUICKSORT(A, low, p-1)
QUICKSORT(A, p+1, high)
Algorithm PARTITION(A, low, high) {
// pivot = A[high] pivot =
A[high] i = low - 1 for j =
low to high-1 if A[j] <=
pivot i = i + 1 swap A[i],
A[j] swap A[i+1], A[high]
return i+1
}}}
4
Example

6
5

7
8
6

9
n
b
i
n
b

HOD Signature:- Subject Faculty Signature:-

10
b
k

11

You might also like