1/27/2003
CS2 Week 7
70
Sorting: Analysis
•
Insert (
i
+1)
th
item:
~ log
2
(
i
) comparisons
•
~
log
2
n
•
Average Case:
O(
n
log(
n
))