Skip to main content

Design and Analysis of Algorithms MCQs with Answers

Practice important Design and Analysis of Algorithms MCQs with answers and explanations.

Multiple Choice Questions

Q191: A greedy algorithm works in how many phases?
  • A: One phase
  • B: Two phases
  • C: Three phases
  • D: Multiple phases
View Answer
D

Q192: In a greedy algorithm, what does each phase focus on?
  • A: Finding the best future solution
  • B: Taking the best current option
  • C: Considering all possibilities
  • D: Minimizing time spent
View Answer
B

Q193: The Coin Change problem aims to minimize what?
  • A: The number of coins used
  • B: The denominations used
  • C: The total value of coins
  • D: The types of coins used
View Answer
A

Q194: Which of the following is a characteristic of greedy algorithms?
  • A: They always find the optimal solution
  • B: They sometimes find the optimal solution
  • C: They never find the optimal solution
  • D: They always fail
View Answer
C

Q195: In the U.S.A., what is the smallest denomination of coin?
  • A: One cent
  • B: Ten cents
  • C: Five cents
  • D: Twenty-five cents
View Answer
A

Q196: Which of the following is an example of a greedy algorithm?
  • A: Dynamic programming
  • B: Huffman encoding
  • C: Linear search
  • D: Coin change algorithm
View Answer
C

Q197: In a fictional monetary system with denominations of 1 kron, 7 kron, and 10 kron, what is the optimal way to make 15 krons?
  • A: Five 1 kron pieces and one 10 kron piece
  • B: One 10 kron and five 1 kron pieces
  • C: Two 7 kron pieces and one 1 kron piece
  • D: Three 5 kron pieces and zero coins
View Answer
C

Q198: What is the main characteristic of the coins in the greedy approach?
  • A: They are all even numbers
  • B: They are all odd numbers
  • C: They are powers of a fixed denomination
  • D: They are random values
View Answer
C

Q199: The dynamic programming solution for the Coin Change problem involves creating a table with what dimensions?
  • A: k x N
  • B: 1 x k
  • C: N x k
  • D: k x k
View Answer
A

Q200: What is the time complexity of the greedy algorithm for the Coin Change problem?
  • A: O(k)
  • B: O(N)
  • C: O(kN)
  • D: O(1)
View Answer
A

Test Your Knowledge

Take a timed quiz on Design and Analysis of Algorithms

🚀 Start Quiz Now