Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Delete the node at a given position 2 in a linked list and return a reference to the head node. The head is at position 0. The list may be empty after you delete the node. In that case, return a null value.

Write python code for the following problem:
Delete the node at a given position in a linked list and return a reference to the head node.
The head is at position 0. The list may be empty after you delete the node. In that case,
return a null value.
Example:
Llist = 0 -> 1-> 2 -> 3
Position = 2
After removing the node at position 2, Llist = 0 -> 1-> 3
The Class is given below for your reference:
Class P:
int D
P To
 
PREVIOUS NEXT
Tagged: #Delete #node #position #linked #list #return #reference #head #The #head #position #The #list #empty #delete #In #return #null
ADD COMMENT
Topic
Name
2+6 =