Tech Mahindra interview question

Write a pseudo algorithm to solve the knapsack problem.