Pregunta de entrevista de Robinhood

Basic programming questions, one was knapsack algorithm.