algorithm for fractional knapsack problem using greedy method