Thanks for your helpful answer TrueFalse questions mark O or
Thanks for your helpful answer!
True/False questions (mark O or X):+1 pt for correct answer, -1 pt for wrong answer and 0 for no answer. If d(n) is O(f(n)) is O(g(n)), then d(n) is O(g(n)) If d(n) is O(n^2) and e(n) is O(n^3), then d(e(n)) is O(n^6) Every O(n) algorithm runs faster than O(n^2) algorithm for the same data of size n.Solution
Answer:
3. True, Given d(n) = O(f(n)) that is d(n) <= c*g(n) , let d(n) < g(n) here
given f(n) = O(g(n)) , that is f(n) < = g(n) , let f(n) < g(n) here
if d(n) < f(n) < g(n) , then d(n) < g(n) => d(n) = O(g(n)).
4. False , d(e(n)) is not the representation of the asymptotic notations.
5. O(n) < O(n^2) , that means O(n) takes less time than O(n^2). Thus O(n) is faster than O(n^2).
