-
Notifications
You must be signed in to change notification settings - Fork 1
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…
maha-hamza/packer
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Coder: Maha M. Hamza Assignment Description ---------------------- 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. Algorithm --------- 1- start 2- take input String from user "expect to be data file path" 3- validate the input 4- through APIException in case of null, empty or malformed input and terminate the processing 5- parse the file data and store them into list of packages 6- start processing by sorting the list by highest price and send pick the best items 7- convert output into string 8- return with the output
About
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…
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published