Skip to content

Files

Latest commit

 

History

History
19 lines (14 loc) · 711 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 711 Bytes

Knapsack Problem 🎒

Description

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.

Core Concepts

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.

Installation

npm i
tsc index.ts
node index.js