Algorithm question -


if f(x) = o(g(x)) x -> infinity, then

a. g upper bound of f

b. f upper bound of g.

c. g lower bound of f.

d. f lower bound of g.

can please tell me when think , why?

answer

g upper bound of f

when x goes towards infinity, worst case scenario o(g(x)). means actual exec time can lower g(x), never worse g(x).

edit:

as oli charlesworth pointed out, true arbitrary constant k <= 1 , not in general. please @ answer general case.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -