WA in Next pallindrome

this is my code for Next Palindrome…please help me
… i am a beginner at this level … and this code is in C lang …
it always shows me a wrong answer.i tried almost all corner cases … used unsigned long long type and tried corner cases also …
thanking you in anticipation

The Q states that-

For a given positive integer K of not more than 1000000 **digits**

The number has 10,00,000 digits. Such a large number wont fit in even long long int of C. If you’re beginner, then skip this problem for later till you are done with arrays and strings.

You can find the algorithm/ method to solve it here, in case you still want to give it a try - Given a number, find the next smallest palindrome - GeeksforGeeks

thanks ! this was my first question on the forum. So you guys are quite helpful. thanks again!

1 Like