question=https://hack.codingblocks.com/contests/c/424/117
solution=https://ide.codingblocks.com/#/s/14132
Time limit exceeded
Hey , you are using same the linked list for all tests.You should make it null everytime.
I have corrected your code and has left comments.Once you see,it will be clear to you.
https://ide.codingblocks.com/#/s/14150
1 Like
Silly mistake.
Thank you!!