



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An analysis of the quick-sort algorithm, discussing its best, average, and worst-case scenarios. The best case occurs when the input is already sorted or reversely sorted, resulting in a time complexity of o(nlogn). The average case assumes a split of 1/10: 9/10, leading to an average time complexity of o(nlogn). The worst case, with an unbalanced partition, results in a time complexity of o(n^2). The document also mentions that quick-sort sorts in-place and requires minimal additional space.
Typology: Slides
1 / 6
This page cannot be seen from the preview
Don't miss anything!




76
77
cn
2 × cn/2 = cn
4 × c/4 = cn
n/3 × 3c = cn
log n levels
n
n/
n/
n/
n/
n/ n/
79
cn
cn
cn
≤cn
n
0.1n
0.9n
0.01n
0.09n
0.09n
0.81n
log
10
n
log
10/
n
≤cn
80
2