Pregunta de entrevista de Tech Mahindra

Write a pseudo algorithm to solve the knapsack problem.