https://ide.codingblocks.com/#/s/28208
https://hack.codingblocks.com/contests/c/509/184
how do i check if my number is mirror-inverse
Https://ide.codingblocks.com/#/s/28208
https://ide.codingblocks.com/#/s/28242
inverse function was correct, but if you compare ‘n’ and ‘sum’ inside that function, it will take new updated value of n i.e. 0, and produce incorrect result. If i pass n to inverse in call by value fashion(like you did) and compare n (which is unchanged as it is passed by value) with value returned by inverse, i got required results.
Note this code wont work if input is greater than 18 digit number. A better solution exists for this question.
can u pls send the updated code of urs?
just take the input in form of array or string and find inverse like we do in normal functions, and compare the inverse string and original string.
ok
bhaiya…thank you
1 Like