# Fractional Knapsack Problem Multiple choice Questions and Answers (MCQs)

## Fractional Knapsack Problem Multiple choice Questions and Answers (MCQs)

 Question 1 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Fractional knapsack problem is also known as .....
 A 0/1 knapsack problem B Continuous knapsack problem C Divisible knapsack problem D Non continuous knapsack problem
Question 1 Explanation:
Fractional knapsack problem is also called continuous knapsack problem. Fractional knapsack is solved using dynamic programming.

 Question 2 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Fractional knapsack problem is solved most efficiently by which of the following algorithm?
 A Divide and conquer B Dynamic programming C Greedy algorithm D Backtracking
Question 2 Explanation:
Greedy algorithm is used to solve this problem. We first sort items according to their value/weight ratio and then add item with highest ratio until we cannot add the next item as a whole. At the end, we add the next item as much as we can.

 Question 3 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the objective of the knapsack problem?
 A To get maximum total value in the knapsack B To get minimum total value in the knapsack C To get maximum weight in the knapsack D To get minimum weight in the knapsack
Question 3 Explanation:
The objective is to fill the knapsack of some given volume with different materials such that the value of selected items is maximized.

 Question 4 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following statement about 0/1 knapsack and fractional knapsack problem is correct?
 A In 0/1 knapsack problem items are divisible and in fractional knapsack items are indivisible B Both are the same C 0/1 knapsack is solved using a greedy algorithm and fractional knapsack is solved using dynamic programming D In 0/1 knapsack problem items are indivisible and in fractional knapsack items are divisible
Question 4 Explanation:
In fractional knapsack problem we can partially include an item into the knapsack whereas in 0/1 knapsack we have to either include or exclude the item wholly.

 Question 5 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Time complexity of fractional knapsack problem is .....
 A O(n log n) B O(n) C O(n2) D O(nW)
Question 5 Explanation:
As the main time taking a step is of sorting so it defines the time complexity of our code. So the time complexity will be O(n log n) if we use quick sort for sorting.

There are 5 questions to complete.