MCQ Practice Single Best Answer Topic: Greedy Algorithms

Q Which of the following is an example of a problem that cannot be solved using a greedy algorithm?

Question ID
#5740
Subchapter
Greedy Algorithms
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A Finding the shortest path between two nodes in a graph
  • B Computing the greatest common divisor of two numbers
  • C Sorting a list of integers
  • D The traveling salesman problem
Correct Answer: D

Explanation

Answer : The traveling salesman problem

Explanation: The traveling salesman problem is a well-known problem that cannot be solved using a greedy algorithm since it requires examining all possible permutations of the cities to find the shortest possible route.

Share This Question

Share this MCQ with your friends or study group.