Amazon Interview Question

Fractional Knapsack problem, Binary search