Professional Documents
Culture Documents
Algo (OS052020) Quiz 1: - Socrat1ve
Algo (OS052020) Quiz 1: - Socrat1ve
•• • Name
Date
------- ·--·--- - -- - - - -
-I
1. Solve the recurrence T(n) = T(n/2) +1
@ O(n)
1-- [
@ O(nlog n)
'1?J'o(lo gn) =
@ O(n 2 )
L.
I
2. Solve the recurrence T(n) = 9T(n/3) +n
@ T(n) = Theta(n)
® T (n) = Theta (n 2)
© T(n) = Theta(log n)
T(n) = Theta(n log n)
$1ndex
@ None of the above
© variable
@ O(n)
I
S. Which of the following is correct?
@ 0(1)<0(1og n)<O(n togn)<O(n)<O(n 2)<0(n 3)<0(2")
@ T(n) = Theta(n 2)
@ Theta(n 2)
~O(n)
@ Theta(1)
8. A recursion tree is drawn with cost of single call in each node, the running time is the sum of
costs in
$ A l l nodes
@ some nodes
© ·root nodes
@ leaf nodes
© whole problem
@ none of the above
© definiteness
~oftware engineering