• + 0 comments

    Here is the solution of this question in PYTHON

    def permutationEquation(p):
        position1 = []
        position2 = []
        for i in range(1,len(p)+1):
            for j in range(len(p)):
                if(i == p[j]):
                    position1.append(j+1)
                    break
        for item in position1:
            for i in range(len(position1)):
                if(item == p[i]):
                    position2.append(i+1)
        return position2