info@avatto.com
+91-9920808017
6. f(n) is of the order of g(n) if there exist positive integers "a" and "b" such that
f(n) = b
f(n) <= a * g(n) for all n <= b
g(n) = a * f(n) for all n >= b
none of these
Your email address will not be published. Required fields are marked *
Report
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Comment
7. The running time of an algorithm T(n) where (n) is the input size is given by T(n) = 8T (n/2) + qn, if n > 1 p, if n = 1 where p, q are constants. The order of the algorithm is
n2
nn
n3
n
8. The running time T(n), where (n) is the input size of a recursive algorithm is given as follows : T(n) = C + T(n - 1); if n > 1 = d, if n ≤ 1 The order of the algorithm is
9. Consider following two functions f(n) = n3, if 0 ≤ n < 10,000 n2, otherwise g(n) = n, if 0 ≤ n < 100 n2 + 5n, otherwise Which of the following are true?
f(n) is O(n3)
g(n) is O(n3)
O(f(n)) is same as O(g(n))
g(n) is O(n2)
10. The complexity of comparison based sorting algorithms is
8(n logn)
8(n)
θ(n2)
θ (n A n)
Login with Facebook
Login with Google
Forgot your password?
Lost your password? Please enter your email address. You will receive mail with link to set new password.
Back to login