This project provides a JavaScript implementation of the Knapsack Problem. The Knapsack Problem is a classic combinatorial optimization problem, where the goal is to pack a knapsack with a limited capacity with items in such a way that the total value of the items is maximized.
The Knapsack Problem can be described as follows:
- You have a knapsack with a limited weight capacity.
- You have a set of items, each with a weight and a value.
- Your goal is to choose items to place in the knapsack so that their total value is maximized, without exceeding the weight capacity of the knapsack.
npm i
tsc index.ts
node index.js