Efficiency of Algorithms. February 11th. Efficiency of an algorithm. worst case efficiency is the maximum number of steps that an algorithm can take for any collection of data values. Best case efficiency
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
worst case efficiency
is the maximum number of steps that an algorithm can take for any collection of data values.
Best case efficiency
is the minimum number of steps that an algorithm can take any collection of data values.
Average case efficiency
- the efficiency averaged on all possible inputs
- must assume a distribution of the input
- we normally assume uniform distribution (all keys are equally probable)
If the input has size n, efficiency will be a function of n
(Copy it into position newposition in new list
6 if Aleftt ≠ 0
7 Increase left by 1
8 Increase right by 1
10 Reduce legit by 1
14 Set right to left + 1
10 Reduce right by 1
Does algorithm efficiency matter??
Else start = m
(1) << (lg n) << (n) << (n2)