Dailyhunt Interview Question

Knapsack problem, Bit manipulation question.