M

Mr. Dubey • 100.69K Points
Coach

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)
Share

Explanation by: Mr. Dubey
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.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics