public static void main(String args[]){
        int src[] = {1,2,5,7,8};
        int dest[] = {5,8,1,9,8};
        PermutationLargerThanGivenArray nld = new PermutationLargerThanGivenArray();
        int result[] = nld.findBiggerNumber(src, dest);
        if(result != null){
            for(int i=0; i < result.length; i++){
                System.out.print(result[i] + " ");
            }
        }else{
            System.out.println("Cant find bigger permutation");
        }
    }
e.g if src array is {1,2,5,7,8} and dest is {5,8,1,9,8}
permute src in such a way that it is greater than dest but diff is minimal
so here we will have {5,8,2,1,7}
src/com/interview/number/PermutationLargerThanGivenArray.java