How do I get c = 4 and n0 = 21, I understand that I could plug in different numbers till f(n) ≤ c * n for all n ≥ n0, but using f(n) how do I arrive at those numbers?
3n^3 + 20n^2 + 5
3n^3 + 20n^2 + 5 is O(n^3)
need c > 0 and n0 ≥ 1 such that 3n^3 + 20n^2 + 5 ≤ c*n^3 for n ≥ n0
this is true for c = 4 and n0 = 21
I'm also struglling to get my head around this one,
3 log n + 5
3 log n + 5 is O(log n)
need c > 0 and n0 ≥ 1 such that 3 log n + 5 ≤ c*log n for n ≥ n0
this is true for c = 8 and n0 = 2