analysis Big Oh notation psuedocode
- by tesshu
I'm having trouble getting my head around algorithm analysis. I seem to be okay identifying linear or squared algorithms but am totally lost with nlogn or logn algorithms, these seem to stem mainly from while loops? Heres an example I was looking at:
Algorithm Calculate(A,n)
Input: Array A of size n
t?0
for i?0 to n-1 do
if A[i] is an odd…