In: Computer Science
1) B) At least one item and at most n items
At least one item --- because at least a fraction of the item can be included.
At most n items --- because we can include the fraction of all the items
2) D) Θ(n log n) --- Time complexity is Θ(n log n)
3) F) fraction = remaining capacity / (value[i]/weight[i])
Because we need the remaining capacity to get the fraction
and value and weight of the item is important to calculate the fraction
value/weight gives a factor which can be used to calculate the fraction