Knapsack Optimizer Knapsack is an NP hard problem, which make it computationally expensive to solve. Here we use DP ,BFS(best first search) and greedy algorithms to optimize it.