Does greedy algorithm guarantee optimal solution? Solve Fractional knapsack to find maximum loot (W=20kg). [2+8]

Does greedy algorithm guarantee optimal solution? Solve Fractional knapsack to find maximum loot (W=20kg). [2+8]

The verified answer for this question is being prepared. Meanwhile, the chapter notes cover this topic, and you can contribute your own solution.