1.0.0 • Published 3 years ago

mobiquity_packager v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

You want to send your friend a package with different things. Each thing you put inside the package has such parameters as index number, weight and cost. The package has a weight limit. Your goal is to determine which things to put into the package so that the total weight is less than or equal to the package limit and the total cost is as large as possible. You would prefer to send a package which weighs less in case there is more than one package with the same price.

////////////////////////////////

this problem is solved by using knapsack alogrithm. it will find items with less weight that fulfills weight limit requirment and sum of their cost willl be as large as possible.

/////////////////////////////////

How to run?

import {Packer} from 'dist/js/index'

Packer.pack( "C:/Users/HP/Desktop/mobiquity/skeleton_javascript/resources/example_input" );

it will accept absolute filepath as input.

///////////////////////////////////

To run tests

npm run test