

MCQOPTIONS
Saved Bookmarks
This section includes 4 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structure knowledge and support exam preparation. Choose a topic below to get started.
1. |
You are given infinite coins of denominations 3, 5, 7. Which of the following sum CANNOT be achieved using these coins? |
A. | 15 |
B. | 16 |
C. | 17 |
D. | 4 |
Answer» E. | |
2. |
Suppose 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 space complexity of a dynamic programming implementation used to solve the coin change problem? |
A. | O(N) |
B. | O(S) |
C. | O(N<sup>2</sup>) |
D. | O(S*N) |
Answer» C. O(N<sup>2</sup>) | |
3. |
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(N<sup>2</sup>) |
D. | O(S*N) |
Answer» E. | |
4. |
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 |
Answer» C. Divide and conquer | |