I have been trying this problem and I am not able to figure out why it is giving Time Limit Exceed.Please help me out by looking into the problem.
Time Limit Exceed
Because of the constraints you need to do the insertion of a node in the LL, as well as merging both the LL in O(N).
You can check out this code
What changes were asked to be made such that my code becomes error free have been made but the problem stays as it is but only passing one test case!
Can you please help me by specifying the error: