Click here to Skip to main content
15,892,927 members

Comments by Frozen Frostings (Top 1 by date)

Frozen Frostings 5-Dec-22 12:01pm View    
Deleted
It works for majority of the cases but has a minor bug. The bug is that whenever we need to delete last node also as part of adjacent duplicates removal for cases like abb , aabcdd , aaa ,etc. it's showing segmentation fault. Can you please identify the error? I used printf() statements to see where the error might be and it error occurs when we try to go inside if(current->data==current->next->data) loop after reaching last node. I don't know why it can't go inside that if loop though.