Friday, October 15, 2010

Algorithm to find the least number of coins

This is a simplest puzzle asked in interviews. You are given coins of denominations 5 Rs, 2 Rs, 1 Re, 50 Paisa, 25 Paisa and 10 Paisa. For any given currency value (assume > 10 Rs), determine the change to be given in coins. While doing this ensure that the number of coins are minimum.

Solution:

No comments:

Post a Comment

UA-36403895-1