can you explain a question with more examples
Can you explain a question
Hey @anubhavb11
you will be given a number, you are allowed to “invert” some digits in this number. Inverting a digit means that you can replace the digit t with 9-t so some of the inversion pairs are
1, 8
2, 7
3, 6, and so on
You have to invert some of the digits in the given number such that the minimum possible number is made.
for eg for the given number 4545 you can make the numbers like these by inverting digits
4444,
5445,
4454,
5454,
5555,
It is clear that the minimum possible number is 4444
failing test case 4
Hey @anubhavb11
You’ve to keep one thing in mind,
If the first digit of the number is 9, you can’t change it to 0,
Coz the number of digits in your number will be reduced,handle this thing in your code.
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.