major implementation of recursive finding kth permutation
v1 of getPermutation