public static void main ( String args[] ) {
        int total = 13;
        int coins[] = {7, 3, 2, 6};
        CoinChangingMinimumCoin cc = new CoinChangingMinimumCoin();
        Map<Integer, Integer> map = new HashMap<>();
        int topDownValue = cc.minimumCoinTopDown(total, coins, map);
        int bottomUpValue = cc.minimumCoinBottomUp(total, coins);

        System.out.print(String.format("Bottom up and top down result %s %s", bottomUpValue, topDownValue));

    }
Bottom up way of solving this problem.
Keep input sorted. Otherwise temp[j-arr[i]) + 1 can become Integer.Max_value + 1 which
can be very low negative number
Returns Integer.MAX_VALUE - 1 if solution is not possible.
src/com/interview/dynamic/CoinChangingMinimumCoin.java