My output is right but test case is not working please help

this is completely different from my code and a bit difficult to understand, could you suggest changes in my code only? so that i could improvise it to get the right answer?
what is wrong with my code?

yes… let me see ur code…

yes sure thank you

okay… so i have corrected ur code… https://ide.codingblocks.com/s/610481
its working fine now…

1 Like

um isnt b[a[j]]= b[number inside array a’s jth position]
what does b[a[j]]=j do here?

im so sorry im new to this array inside an array concept is there any tutorial related to this i can watch and then maybe i could understand better

b[a[j]]=j
here we are just creating another array and storing index of that element at the position of value of current element… maybe u can just dry run it… u would get better insight…

actually i dont know if any lecture is available on same or not…

okay i guess i got it after dry running im still confused if the input were different the output wouldn’t have been correct or maybe i dont understand inverse of a number that’s why

okay i got it now
thank you!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.