I am getting a TLE error in Merge Sorted Linked Lists assignment code. How do I fix it?
hey @Aniruddha, you are getting TLE because you are not updating ahead and bhead after each testcase to NULL. Previous value of these are considered in new testcase also.
So declare them inside the while loop not outside.
I have make these changes for you, you can check them https://ide.codingblocks.com/s/80245
1 Like
Thank you so much for your help !!
hey Aniruddha, if your query is resolved. Please mark this doubt as resolved and rate me on the basis of your experience.
rating option will appear when to mark this doubt as resolved