retsambew / Knapsack-Visualizer

DP 0/1 Knapsack Algorithm Visualizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0/1 Knapsack Visualizer

Knapsack problem is one of the most common problem that occurs in daily life. From transporting non dispensible items to taking a simple shopping bag home you always want to maximize your output.

img

Our program helps you visualize the DP based solution for maximizing the profit. It helps you build the DP table by taking weight array, profit array for each item and maximum carryable weight as input. It also allows you to control the speed of animation as requirement.

Hardware Requirement:

  • Any device that can access web.
  • Internet Access.
  • Input device. (Keyboard/Mouse)

Software Requirement:

  • Web Browser

How to access

To access the visualizer you can got to the following link:
https://retsambew.github.io/Knapsack-Visualizer/
------- OR -------
You can download the code and can run index.html file in your web browser

Execution

To get maximum profit along with the steps of creating DP Table, enter the weight and profit of each item. Then, enter maximum carryable weight and press enter. Thats it!!! You can now see maximum profit at top and DP Table. If speed feels too high or too low you can adjust it and press start again to rerun.

Screenshots: ss1
ss2
ss3

Technologies Used:

html css js bootstrap

About

DP 0/1 Knapsack Algorithm Visualizer

License:GNU General Public License v3.0


Languages

Language:JavaScript 61.3%Language:HTML 23.9%Language:CSS 14.8%