Kindly check what's wrong in the code of deletion at middle function

Hello @Himanshu0123,

Why are you deleting head when p>length_linked_list.
Ratheryou should print an appropriate messaging stating “node is not present”.

I have modified your function:

Hope, this would help.
Give a like if you are satisfied.