Write Pseudocode to remove the node at position 1 in a doubly-linked list. Assume position follows classic indexing from 0 to item_count - 1, and there is a node at position 2.
As given there are nodes at position 0,1, and 2 and node at postion 1 needs to be removed
let first node is head
Pseudocode
temp = head->next;
set head ->next->next->prev = head;
set head -> next = head ->next -> next;
delete memory for temp.
Diagrametical representation is given below.
Get Answers For Free
Most questions answered within 1 hours.