Match List I with List II
| List I | List II |
|---|---|
| A. 8-Queens problem | I. Divide and conquer |
| B. Closest pair of points | II. Dynamic Programming |
| C. String edit problem | III. Greedy Method |
| D. Knapsack problem | IV. Backtracking |
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. A-IV, B-I, C-II, D-III
Explanation
8-queens is solved by backtracking (IV), closest pair of points by divide and conquer (I), string edit distance by dynamic programming (II), and the (fractional) knapsack by the greedy method (III).More Data Structures and Algorithms questions
- Arrange the following search and sort algorithms in ascending order of their worst-case complexities: A. Merge sort B. Linear search C. Bub…
- Find the optimal solution of the fractional knapsack problem when the maximum capacity is 15.
- What is the maximum value of the items you can carry if the maximum weight allowed is 25 (fractional knapsack)?
- If a new item (P = 5, W = 2) is added, giving 8 items, and the capacity is 25, then the time of fractional knapsack in this case is ______
- The most efficient solution to the fractional knapsack problem with maximum capacity 15 is obtained using ___
- Which of the following statements about the knapsack problem is correct?