Kittu
BAN USER- 0of 0 votes
AnswersA seller sells lot of products in his store and people place orders,just like any other store. Each item has a different weight and price.
- Kittu in India
And each order can be a combination of different number of items with random quantity. Now each of these orders areto be put into different packages and sent to the courier company for delivery.
But there are certain rules while splitting items into packages, they are as below:
1. If the cost of all the items in an order is more than $1000, split those items into multiple
packages, otherwise one package would be enough.
2. If the items in the same order are split into multiple packages, then the weight of the
packages should be equally distributed over the packages with consideration of optimum
courier charges.
3. While splitting, NO PACKAGE can have a total price above $1000| Report Duplicate | Flag | PURGE
ADP Dev Lead Dev Lead Algorithm
I will tell an example for suppose a user ordered $2000 worth 3 products with weights 1000g, 500g, and 500g. Now we need to split as per 1st condition so we split into 2 packages with each 1000g. Costs of the products also same 1000, 500 and 500 rupees. Check now each package doesn't have more than 1000 rupees worth products, if package has more than 1000 than you have do divide the package into some other way
- Kittu November 22, 2014
Can you explain your algorithm.
- Kittu November 23, 2014