typo fixed
two methods to solve the coin-change-like problem