-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
23 lines (17 loc) · 871 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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