private void findMinRecursive(int[] a, int n, int i, int c){
        if(n<0 || count <= c || i<0 || n/a[i] >= count) return; // pruning here
        
        if(n==0){
            found=true;
            count=Math.min(c, count);
            return;
        }
        if(a[i]<=n) // pruning here also
        findMinRecursive(a, n - a[i], i, c + 1);
        findMinRecursive(a, n, i - 1, c);
    }
This is brute force accepted solution with a lot of pruning.
In most cases, this almost exponential solution is not accepted
Idea is generating all possible permutations and pruning by avoiding some cases
src/problems/medium/CoinChange.java