0% found this document useful (0 votes)
94 views

CSCI2100 Quicksort Demo

This document is a slideshow presentation demonstrating the quick sort algorithm. It shows the step-by-step process of sorting an array of numbers using quick sort. The presentation identifies the pivot element, partitions the array around the pivot, and recursively applies the same process to the subarrays until the entire array is sorted.

Uploaded by

energy0124
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views

CSCI2100 Quicksort Demo

This document is a slideshow presentation demonstrating the quick sort algorithm. It shows the step-by-step process of sorting an array of numbers using quick sort. The presentation identifies the pivot element, partitions the array around the pivot, and recursively applies the same process to the subarrays until the entire array is sorted.

Uploaded by

energy0124
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

CSCI2100B Data Structures

Quick Sort Demo


Irwin King
[email protected]
http://www.cse.cuhk.edu.hk/~king
Department of Computer Science & Engineering
The Chinese University of Hong Kong
CSC2100B Data Structures, CUHK, Irwin King

26

37

61

11

59

CSC2100B Data Structures, CUHK, Irwin King

15

48

19

26

>=p

<p

37

61

11

59

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

15

48

19

26

>=p

<p

37

61

11

59

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

15

48

19

26

>=p

<p

37

61

11

59

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

15

48

19

26

>=p

<p

37

61

11

59

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

15

48

19

26

>=p

<p

37

61

11

59

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

15

48

19

26

>=p

<p

37

61

11

59

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

15

48

19

26

>=p

<p

11

61

37

59

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

15

48

19

26

>=p

<p

11

61

37

59

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

15

48

19

26

>=p

<p

11

61

37

59

15

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

48

19

26

>=p

<p

11

15

37

59

61

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

48

19

26

>=p

<p

11

15

37

59

61

48

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

19

26

>=p

<p

11

15

37

59

61

48

19

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

26

>=p

<p

11

15

19

59

61

48

37

i
LastSmall
Pivot

CSC2100B Data Structures, CUHK, Irwin King

19

>=p

<p

11

15

26

59

Pivot

CSC2100B Data Structures, CUHK, Irwin King

61

48

37

You might also like