Dailyhunt interview question

Knapsack problem, Bit manipulation question.