Skip to content

roushanj/delivery-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

delivery-problem

ProblemOne

Usage

--> node problemOne.js '[{"PKG":"2", "weight":75,"distance": 125,"offering":"off002"}, ...more]'

ProblemTwo

Usage

--> node problemTwo.js 'no_vehicle' 'max_speed' 'max_weight' '[{"PKG":"2", "weight":75,"distance": 125,"offering":"off002"}, ...more]'

Description

-> Group.js --> This will return an array according to condition that states 'No PKG weight should be greater than N & max package should deliver at once'

-> module.js --> This will return Discounted value of packages and takes user input.

-> Offers --> Offers are present in module.js , we change the variable value there only or we can create JSON file seperate

Test

Usage - Mainly we need to test grouping & Discount function (You can add more custom test cases there )

--> node group.test.js
--> node module.test.js

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published