Give big Oh notation b 10n2 20n log n 6n 8 c 6n 5 log n
Give big Oh notation b. 10n^2 + 20n log n + 6n + 8 c. 6n + 5 log n + 2 d. 6n + 5n log n + 2 e. 4n^2 + n log n + 3 f. n^3 + 2^n
Solution
b)
10n2+20nlogn+6n+8
big Oh notation : O(n2)
because the growth rate of n2 is greater than nlogn, n and constant(8)
c)
6n+5logn+2
big Oh notation : O(n)
because the growth rate of n is greater than nlogn and constant
d)
6n+5nlogn+2
big Oh notation : O(nlogn)
because the growth rate of nlogn is greater than n and constant(2)
e)
4n2+nlogn+3
big Oh notation : O(n2)
because the growth rate of n2 is greater than nlogn and constant
f)
n3+2n
big Oh notation :O(2n)
because the growth rate of 2n is greater than n3
