Add nth lexographic permutation code to solve problem 24. Nice solution to avoid brute forcing it.