You are not logged in.
Pages: 1
Hi everyone,
I'm having problems with Big-O notation, I'm somewhat understand how to solve the K and the C but I'm not quite sure how to solve this particular question
f(n) is O(g(n))
First question:
f(n) = n^2
when n is even then g(n) = n
when n is odd then g(n) = n^3
Second question:
f(n) = n^2 + 1000n
when n <= 100 then g(n) = n
when n > 100 then g(n) = n^3
The question is do I need to solve two k and two c or one k and one c will be okay for each question.
Do I need to look at the question as a whole or two separate entities.
Can someone kindly tell me how to solve these questions
Thank you in advance
Pages: 1