• + 0 comments

    Here is my one line Python solution!

    def permutationEquation(p):
        return [p.index(p.index(i + 1) + 1) + 1 for i in range(len(p))]