To which of the following domain problem does the knapsack problem belong?

2024

To which of the following domain problem does the knapsack problem belong?

  1. A.

    NP-complete

  2. B.

    Sorting

  3. C.

    Optimization

  4. D.

    Linear Solution

Attempted by 45 students.

Show answer & explanation

Correct answer: C

Correct Answer: Option C

Explanation: knapsack algorithm is used to find the maximum profit out of the least weight combination possible, therefore it definitely belongs to an optimization domain.

Explore the full course: Coding For Placement