in Algorithms
553 views
1 vote
1 vote
Which is not O(n^2)?

a) (15^10) *n +12099

b) n^1.98

c) n^3 / sqrt(n)

d) (2^20)*n
in Algorithms
by
553 views

4 Comments

only c) is not O(n2)....

n3/sqrt(n)= n2.5= O(n3)

0
0
even option a and d is not O(n^2)

they are O(n) right?
0
0

but O(n) can be bounded in O(n2), since n2>n,

and yes a) and d) has a tightest upper bound as O(n), but they can be also bounded in O(n2)

0
0
got it :)
0
0

Please log in or register to answer this question.