+ 1
double linked list remove duplicate
https://code.sololearn.com/cpO696sbzncN hi friends here is my code i am getting the output correctly but at one stage i am getting segmentation fault when the duplicate number is in the last node... then it's getting segmentation fault. please suggest me the solution
2 Antworten
+ 2
modify the program using dynamically initialized variable.....
+ 1
SoloLearn asks for input before the program starts. So your while 1 keeps repeating the software, even if there is no input anymore. This probably is causing an overflow somewhere, probably at the stack, in which throws the segfault you are looking for. I recommend not using while 1, but a validation condition