+ 3

Big O notation question

What is the upper bound for the function f(n)=2n³-2n².

10th Jan 2021, 7:13 AM
Achintya Raj
Achintya Raj - avatar
6 Respuestas
+ 6
2n³ - 2n² <= 2n³ , for all n >= 1 O(f(n)) = O(2n³) = O(n³) Am I missing anything else?
10th Jan 2021, 7:26 AM
Minho
Minho - avatar
+ 4
It has cubic time/space complexity. Not sure if that was the question.
11th Jan 2021, 12:20 AM
Sonic
Sonic - avatar
+ 1
As the condition is 0<=f(n)<=g(n)
10th Jan 2021, 7:13 AM
Achintya Raj
Achintya Raj - avatar
+ 1
Yes you are correct for all n>=1 and c=2
10th Jan 2021, 8:03 AM
Achintya Raj
Achintya Raj - avatar
0
Yes I know the answer but someone was contradicting this so I just want to confirm this
10th Jan 2021, 9:01 AM
Achintya Raj
Achintya Raj - avatar
0
Thank you very much
10th Jan 2021, 9:01 AM
Achintya Raj
Achintya Raj - avatar