(A) recursively
(B) mathematically
(C) accurately
(D) precisely
Tag: Fundamentals of Algorithms
In Sieve Technique we do not know which item is of interest?
(A) True
(B) False
(C) NA
(D) NA
Sieve Technique applies to problems where we are interested in finding a single item from a larger set of __.
(A) n items
(B) phases
(C) pointers
(D) constant
For the Sieve Technique we take time?
(A) T(nk)
(B) T(n / 3) 4
(C) n^2
(D) n/3
Consider the following Algorithm: Factorial (n){ if (n=1) return 1 else return (n * Factorial(n-1)) } Recurrence for the following algorithm is:
(A) T(n) = T(n-1) +1
(B) T(n) = nT(n-1) +1
(C) T(n)= T(n-1) +n
(D) T(n)=T(n(n-1)) +1
How much time merge sort takes for an array of numbers?
(A) (n^2)
(B) T(n)
(C) T( log n)
(D) T(n log n)
What is the solution to the recurrence T(n) = T(n/2)+n?
(A) O(logn)
(B) O(n)
(C) O(nlogn)
(D) O(n^2)
If algorithm A has running time 7n^2 + 2n + 3 and algorithm B has running time 2n^2, then?
(A) Both have same asymptotic time complexity
(B) A is asymptotically greater
(C) B is asymptotically greater
(D) None of others