retagged by
586 views

1 Answer

0 votes
0 votes
We can infer that $f(n) \geq c_1n$ and $g(n) \leq c_2f(n)$, for some $c_1,c_2$.

Let $f(n) = c_1n$.

This implies that $g(n) \leq c_2c_1n$.

Let $c_3 = c_1 \times c_2 \implies g(n) \leq c_n \implies g(n) \in O(n)$.

Related questions

1 votes
1 votes
1 answer
1
Markzuck asked Jan 6, 2019
505 views
Please show the ideal way to deal with such comparisons as I am getting g>=f IN genral what logic shall be followed to analyse such complex comparions?
0 votes
0 votes
1 answer
2
Markzuck asked Dec 29, 2018
800 views
cant we write the recurrance relation for bar() as T(n) = 5T(n-1) + c,like cant we take both the recurrance call as combined as both have same parameter?and if not, then ...