Google interview question

The first technical question was a knapsack problem