πŸ“Š Design and Analysis of Algorithms
Q. You are given infinite coins of N denominations v1, v2, v3,…..,vn and a sum S. The coin change problem is to find the minimum number of coins required to get the sum S. What is the time complexity of a dynamic programming implementation used to solve the coin change problem?
  • (A) o(n)
  • (B) o(s)
  • (C) o(n2)
  • (D) o(s*n)
πŸ’¬ Discuss
βœ… Correct Answer: (D) o(s*n)

Explanation: the time complexity is o(s*n).


Explanation by: Mr. Dubey
the time complexity is o(s*n).

πŸ’¬ Discussion

πŸ“Š Question Analytics

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