Amazon interview question

Fractional Knapsack problem, Binary search