@ZhassanB I think the procedure you mentioned of finding a largest palindrome has a little bit problem. Say, the number is 1923, the left part is 19 which is less than the right part 23, but the next largest palindrome is not 1991 but 1881. So I think the procedure can be modified to "If the reverse of the left part is less than or equal to the right part, then the concatenation of left part and reversed left part is the next largest palindrome; Otherwise, decrease the left part."
But in this particular problem, it does not matter, since the multiple of 9..9 * 9..9 can always produce a number with both the left part and reversed left part are bigger than the right part.
Yes you are right that in interview we don't have all type of test cases and expected output.
But in interview, at least we will check for different inputs and when you are told explicitly that you will have input between range A and B which is so small then you should check for all.
And i know that interviewer will not impress with this solution but you should tell him that,
"I know that, this solution is not what you expected, but this skills will work when when we are with the client or giving demo to the client, and some unexpected error occurred then, at that time we don't have sufficient time to solve that error and can't tell to client that some error occurred, so at that time it's better to fix that error anyhow and handle client and then after that we can fix properly so that this type of error will never occurs again."