Program/Algorithm Efficiency (cont)k a[0]
Worst case: no
Average case: find Could devise "overall average" if we know likelihood of each case. If not, take pessimistic view ... worst case. In fact, both worst and average cases grow linearly. |