private void combinationSumUtil(int[] candidates, int target, List<Integer> r, List<List<Integer>> rr, int pos) {
        if (target == 0) {
            List<Integer> r1 = new ArrayList<>();
            r1.addAll(r);
            rr.add(r1);
            return;
        }

        if (target < 0) {
            return;
        }

        if (pos == candidates.length) {
            return;
        }

        r.add(candidates[pos]);
        combinationSumUtil(candidates, target - candidates[pos], r, rr, pos);
        r.remove(r.size() - 1);

        combinationSumUtil(candidates, target, r, rr, pos + 1);
    }
Date 07/10/2015
@author Tushar Roy

Given an input and total print all combinations with repetitions in this input
which sums to given total.
e.g
input - {2,3,5}
total - 10

Output
[2,2,2,2,2],
[2,2,3,3],
[2,3,5],
[5,5]]
Reference
https://leetcode.com/problems/combination-sum/
src/com/interview/recursion/PrintSumCombination.java