M

Mr. Dubey • 100.69K Points
Coach

Q. Which of the following implementations of Catalan numbers has the smallest time complexity?

  • (A) dynamic programming
  • (B) binomial coefficients
  • (C) recursion
  • (D) all have equal time complexity
Share

Explanation by: Mr. Dubey
The time complexities are as follows:
Dynamic programming: O(n2) Recursion: Exponential Binomial coefficients: O(n).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics