Coin Changing problem solved