My code is showing TLE error

not able to debug the deleteNode function

@Jainish-Patel-1007094602980100

  1. return from the function if node is not found
    image
  2. In the second case also, return after your work is done
    image

Try your code after making these changes and let me know

not working.i think there is something else

@Jainish-Patel-1007094602980100 is it a circular list? If not then this condition in your getNOde function is wrong image

these is the code for circular linked list.i follow the code shown in the video of delete the node

@Jainish-Patel-1007094602980100 please refer to this https://www.geeksforgeeks.org/deletion-circular-linked-list/

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.