Open In App
Related Articles

ISRO | ISRO CS 2008 | Question 69

Like Article
Save Article
Report issue

Which of the following operations is performed more efficiently by doubly linked list than by linear linked list?


Deleting a node whose location is given


Searching an unsorted list for a given item


Inserting a node after the node with a given location


Traversing the list to process each node

Answer: (A)


Doubly linked lists have a few advantages over linear linked lists when it comes to certain operations. Specifically, the following operation is performed more efficiently by a doubly linked list than by a linear linked list

Deleting a node given a pointer to the node.

In a linear linked list, deleting a node requires traversing the list to find the node to be deleted and its predecessor. Once these nodes have been found, the predecessor’s next pointer is updated to skip over the node to be deleted. This operation takes O(n) time in the worst case, where n is the number of nodes in the list.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Last Updated : 08 Jun, 2018
Like Article
Save Article
Share your thoughts in the comments
Similar Reads