can u help me understand the language of the question?
Chewbaca and numbers
hi @tusharjha9835
inversion of a digit means, that if a digit is t, then you replace it with 9-t
so, inversions of all the digits from 0-9 are:
0: 9
1: 8
2: 7
3: 6
4: 5
5: 4
6: 3
7: 2
8: 1
9: 0
Now you will be given a number. You have to invert its digits such that you can make a smaller number, in fact you have to make the smallest possible number, just by inverting the digits of that number
so for example if you have a number 63 you can invert 6 to 3 to make the number 33 (you cannot make a smaller number than 33 by inverting any digits)
However there is a small condition, that there cannot be any leading zeroes in the inverted number.
ie if a number was 98 you cannot make it as 01 in short, the “length” of the number must remain the same. Hence, the acceptable answer would be 91 (you cannot flip 9, but you can flip the 8 to make a smaller number)
I hope have made the question clear to you. Please mark the doubt as resolved in case of no further queries