Deleting temp doubt

in line 63 why outputs comes wrong if i delete temp
we have given address to head
then whats the issue
why can’t i delete it??

hey @yatin, temp is still storing the 8914 as data, thatswhy when you are deleting this, wrong output comes.

ohhhh okok i thought address in temp has been copied so we don’t need it now but deleting temp deletes the node pointed by it,ok sir thank you :slight_smile:

hey @yatin , 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