โ† Amazon questions

Fractional and 0/1 Knapsack

Filed under Amazon

Given weights and values of n items, solve the Knapsack problem. Fractional allows taking parts of items (greedy), while 0/1 requires taking the whole item or nothing (dynamic programming).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.