You have different bundles of balls, which have different number of balls and different price tags. You have unlimited supplies of each of these bundles. Now if I want to get x number of balls, how should I choose bundles which cost me minimum. I am just looking for cost to be minimum, doesn't matter if I get more balls than x. But number of balls should not be less than x.
Example: Bundle 1 Cost: 1050 no of balls: 130 Bundle 2 Cost: 475 no of balls: 70 Bundle 3 Cost: 325 no of balls: 20 Bundle 4 Cost: 1025 no of balls: 8 So if I want 125 balls, I will choose 2 packets of 70 balls each to minimize cost. Regards, Akash Agrawal http://tech-queries.blogspot.com/ -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.