Given a pointer to a node in the middle of a linked list, how will you delete the present node ?
Answer
The trick is in using simple pointer tricks. The "present node" should now point to the "next node". Make sure you delete the data in the "present node"
No comments:
Post a Comment