πŸ“Š Design and Analysis of Algorithms
Q. You are given infinite coins of 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. This problem can be solved using
  • (A) greedy algorithm
  • (B) dynamic programming
  • (C) divide and conquer
  • (D) backtracking
πŸ’¬ Discuss
βœ… Correct Answer: (B) dynamic programming

Explanation: the coin change problem has overlapping subproblems(same subproblems are solved multiple times) and optimal substructure(the solution to the problem can


Explanation by: Mr. Dubey
the coin change problem has overlapping subproblems(same subproblems are solved multiple times) and optimal substructure(the solution to the problem can

πŸ’¬ Discussion

πŸ“Š Question Analytics

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