

McqMate
Q. |
Which of the following is true about the time complexity of the recursive solution of the subset sum problem? |
A. | it has an exponential time complexity |
B. | it has a linear time complexity |
C. | it has a logarithmic time complexity |
D. | it has a time complexity of o(n2) |
Answer» A. it has an exponential time complexity | |
Explanation: subset sum problem has both recursive as well as dynamic programming solution. the recursive solution has an exponential time complexity as it will require to check for all subsets in worst case. |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet