For the above algorithm:
1)
Using operation counting, what are the number of operations for:
- The best case
- The worst case
- The average case
2)
Using Big O notation, describe:
- The best case
- The worst case
- The average case
3) Describe the algorithm's overall performance using Big-O.
4) Describe the algorithm's overall performance using Big-Ω.
5) Describe the algorithm's overall performance using Big-Theta.
6) Select which of the above asymptotic notations is the best way to describe the algorithm's performance.
int: count: :: 0: foriint=OiNi++
ifunlucky
or=Nj>ij--) 1 count=coun+i+j