Trying to understand how to do this Q. Can some explain using O-notation, how would i analyse the efficiency of the two algorithms below. ?
Assuming that the critical operation is compute and size is the size of the array.
1) compute(a) + compute(a) + compute(a) + compute(a)
2) for k = 1 to size for j = 1 to size compute(a[j])
I just need someone to xplain this briefly so that i can understand how i would analyze algorithms of such in the future.
Also what is meant by the terms 'Programming Time' and 'Execution Time' in relation to algorithms.?
Apreciate ne help