Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Reverse each digit with their corresponding new digit if an invalid digit is found the return -1. After reversing the digits just compare the reversed number with the original number.