Download presentation
Presentation is loading. Please wait.
Published byJoan Stanley Modified over 6 years ago
2
Figure 9.1 Time requirements as a function of the problem size n
3
Figure 9.2 When n ≥ 2, 3 * n2 exceeds n2 - 3 * n + 10
4
Figure 9.3a A comparison of growth-rate functions: a) in tabular form
5
Figure 9.3b A comparison of growth-rate functions: b) in graphical form
6
Sorting Algorithms Selection Sort Bubble Sort Insertion Sort Mergesort
Quicksort Radix Sort
7
Figure 9.4 A selection sort of an array of five integers
8
Figure 9.5 The first two passes of a bubble sort of an array of five integers: a) pass 1; b) pass 2
9
Figure 9.6 An insertion sort partitions the array into two regions
10
Figure 9.7 An insertion sort of an array of five integers.
11
Figure 9.8 A mergesort with an auxiliary temporary array
12
Figure 9.9 A mergesort of an array of six integers
13
Figure 9.10 A worst-case instance of the merge step in mergesort
14
Figure 9.11 Levels of recursive calls to mergesort given an array of eight items
15
Figure 9.12 A partition about a pivot
16
Figure 9.13 kSmall versus quicksort
17
Figure 9.14 Invariant for the partition algorithm
18
Figure 9.15 Initial state of the array
19
Figure 9.16 Moving theArray[firstUnknown] into S1 by swapping it with theArray[lastS1+1] and by incrementing both lastS1 and firstUnknown
20
Figure 9.17 Moving theArray[firstUnknown] into S2 by incrementing firstUnknown
21
Figure 9.18a Developing the first partition of an array when the pivot is the first item
22
Figure 9.18b Developing the first partition of an array when the pivot is the first item
23
Figure 9.19 A worst-case partitioning with quicksort
24
Figure 9.20 A average-case partitioning with quicksort
25
Figure 9.21 A radix sort of eight integers
26
Figure 9.22 Approximate growth rates of time required for eight sorting algorithms
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.