private void find(int result[], boolean used[], int start, int n, int m) {
        if(1 == m) {
            fillupRemaining(result, used, start);
            return;
        }
        int index = binarySearch(m, start + 1, n, factorial(n - start - 1));
        int i = nthUnused(used, index);
        used[i] = true;
        result[start] = i + 1;
        find(result, used, start + 1, n, m - (index-1)*factorial(n - start - 1));
    }
@author Tushar Roy
Date 01/21/2016

Given a number n, find mth value in permutation of array consisting of [1..n] values.
mth is defined by lexicographical order.
src/com/interview/number/MthNumberInNSizeArray.java