Given a set of coins and a total money amount. Write a method to compute the smallest number of coins to make up the given amount. If the amount cannot be made up by any combination of the given coins, return -1.

For example:

Given [2, 5, 10] and amount=6, the method should return -1.

Given [1, 2, 5] and amount=7, the method should return 2.