I am attempting next palindrome http://www.codechef.com/problems/PALIN on Codechef and Spoj but the approach is always recieving SIGSEGV although the same approach is getting AC for a similar question
http://www.codechef.com/problems/NXTPALIN I dont’t think I am accessing any illegal memory cell nor I am trying to allocate too much memory my approach on NEXTPALIN that got AC here The similar approach that got a SIG-SEGV on PALIN here any help would be deeply appreciated Thanks in Advance
At the first glance at your code I saw that you declared a character array ‘str’ of size 100000, while maximum input size given in the problem is 1000000(one extra 0 ).
char str[100000];
1 Like