PeterRobinson44
New member
- Joined
- May 14, 2020
- Messages
- 12
Using the provided pseudo-code, find the worst-case performance in Big-O notation.
Pretty much Big-O is finding the largest in the question. I go in this order from lowest to highest. 100, log10^n, 10n, n x log10n, n^2, n^10, 10^n
1) procedure SOMEPROCEDURE1
for i = 1 to n
if (sum == 0)
I believe it's (n^2)
2) procedure SOMEPROCEDURE2
for i = 1 to n
if (sum == 1)
I believe it's (n^2) too
Pretty much Big-O is finding the largest in the question. I go in this order from lowest to highest. 100, log10^n, 10n, n x log10n, n^2, n^10, 10^n
1) procedure SOMEPROCEDURE1
for i = 1 to n
if (sum == 0)
I believe it's (n^2)
2) procedure SOMEPROCEDURE2
for i = 1 to n
if (sum == 1)
I believe it's (n^2) too