question link - https://hack.codingblocks.com/contests/c/509/204
my solution - https://ide.codingblocks.com/#/s/28795
Test case fails
inverse doesn’t mean reverse here.
inverse means the inverse we find in functions
f(1)=2 f(2)=3
then inversef(2)=1 and inversef(3)=2