TouchPal interview question

Knapsack Problem