Please give solurion

I have no idea how to solve please give solution so that I can learn

Hi @akshat1409 eg : 32145 answer is 12543
here u have got the place of numbers in input
for 1 is 5
for 2 is 4
for 3 is 1
for 4 is 2
and for 5 is 3
just place them in this order 12543
u can check the core for the same https://ide.codingblocks.com/s/657727 2