McqMate
| Q. |
The main time taking step in fractional knapsack problem is |
| A. | breaking items into fraction |
| B. | adding items into knapsack |
| C. | sorting |
| D. | looping through sorted items |
| Answer» C. sorting | |
| Explanation: the main time taking step is to sort the items according to their value/weight ratio. it defines the time complexity of the code. | |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet