fractional knapsack problem using greedy algorithm