Twilio interview question

knapsack problem with stocks