Google Company Programming

Let w(n) and A(n) denote the worst case and average case running time of an algorithm executed on an input of size n. which of the following is ALWAYS TRUE?
A) A(n) = Omega(W(n)) B) A(n) = Theta(W(n)) C) A(n) = O(W(n)) D) A(n) = o(W(n)

Read Solution (Total 1)

Google Other Question

Two n-size arrays are given to you. n1 in decreasing order and n2 in increasing order. If c1 is time complexity for n1 using quicksort and c2 is time complexity for n2 using quicksort. Then –
A) c1 > c2 B) c1 < c2 C) c1 = c2 D) None of these
If there is a N sorted array then what is time complexity of finding 2 numbers with sum less than 1000.
A) O(1) B) O(n^2) C) O(n) D) O(logn)