Not getting output

my code of deleting nth node is not working and giving error
please find the flaw in my code and in my logic

@shivamgoel150 corrected your code commented where made the change
(your temp prev and temp2 were not going to correct posn)


if any doubt in it ask me :smiley:
otherwise mark it as resolved