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
πŸ’¬ Discuss
βœ… Correct Answer: (B) binomial coefficients
Explanation: The time complexities are as follows:
Dynamic programming: O(n2) Recursion: Exponential Binomial coefficients: O(n).

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

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
198
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate