Monday 26 July 2010

CodeVita



 A Milkman serves milk in packaged bottles of varied sizes. The possible size of the bottles are {1, 5, 7 and 10} litres. He wants to supply desired quantity using as less bottles as possible irrespective of the size. Your objective is to help him find the minimum number of bottles required to supply the given demand of milk. 

Same program in Java:Find the minimum number of bottles required to supply the given demand of milk for Milk Man




No comments:

Post a Comment