@atul 007.. Also i would like to point out that denomination array that u are using consists of 1 to R. Therefore ideally the answer that you should get for each coin[i] is 1. Hence, its a constant time algorithm ..
On Saturday, 22 December 2012 03:31:52 UTC+5:30, shady wrote: > > Given R and N, output N coins in the range from 1 to R such that average > number of coins needed to represent all the number in the range is > minimized. > > Any idea ? hints ? > --