• + 0 comments
    def permutationEquation(p):
        # Write your code here
        res = []
        for i in range(len(p)):
            x = p.index(i + 1)
            y = p.index(x + 1)
            res.append(y + 1)
        return res