Download presentation
Presentation is loading. Please wait.
Published byCoral Dean Modified over 9 years ago
1
1Computer Sciences Department
2
2 QUICKSORT QUICKSORT TUTORIAL 5
3
Computer Sciences Department3 OBJECTIVES The divide and conquer approach. Quick sort. Example of quicksort. Analysis of quicksort.
4
Computer Sciences Department4 Quicksort
5
5 Procedure implements quicksort
6
Computer Sciences Department6 Partitioning the array
7
Computer Sciences Department7 Exercises Sort the below array by using quicksort : 10619208
8
Computer Sciences Department8 10619208 pivot 10619208 10619208 10619208
9
Computer Sciences Department9 20619108 20619108 20196108 Sorted
10
Computer Sciences Department10 6 8 pivot 6108 6 8 68 Sorted
11
Computer Sciences Department11 68 Sorted 68 86 20191086
12
Computer Sciences Department12 What is the proof of O (n^2)?
13
Computer Sciences Department13
14
Computer Sciences Department14 What is the proof of Omega (n lg n)?
15
Computer Sciences Department15
16
Computer Sciences Department16 Worst case running time : n^2) Expected running time : (n lg n). Sorts in place.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.