Node deleted is last node pointed in Doubly Linked List - Data Structure

Q.  What will happen if the node to be deleted is the last node pointed by ' p ' in a Doubly Linked List?
- Published on 27 Aug 15

a. Head will be advanced to next node
b. No node will be present to its right
c. Both a & b
d. None of the above

ANSWER: No node will be present to its right


  • Shivam Tomar   -Posted on 16 May 20
    In doubly linked list if you are going to delete the last node than u should traverse the list until u haven't find the next pointer is null after that make the next of previous node of last node as null and than delete the last node .
  • Nirja Shah   -Posted on 18 Nov 15
    If you delete the last node in doubly link list then, no node will be present to its right.

Post your comment / Share knowledge

Enter the code shown above:
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)