coinsort algorithm to find least number of items of differing values to sum to one given final value