• + 3 comments

    but using this approach you will generate 9! permutation, wich is 362880, isnt this too much ? the complexity of such an algorithm should be O(N!) if iam not mistaken, is there any solution that runs faster beside the look up table ?