Processing math: 100%
1 / 8
Settings
<<
<
>
>>
Quicksort's worst case will occur when the pivot does a poor job of breaking the array, that is, when there are no records in one partition, and
n
−
1
records in the other
Created with Raphaël 2.1.2
n
|------------------------------------
>
A
[
p
i
v
o
t
]
-----------------------------------|
pivot
n
−
1
n
−
1
Amount Of Work
|----------------------------------
>
A
[
p
i
v
o
t
]
---------------------------------|
pivot
n
−
2
n
−
2
|-------------------------------
>
A
[
p
i
v
o
t
]
-------------------------------|
pivot
n
−
3
n
−
3
............
............
pivot
1
1
|-------------------
n
−
1
-------------------|
Saving...
Server Error
Resubmit