gpac Interview Question

Knapsack problem was asked and 2 sum