Why the time complexity in doubly linked list which is O(1) is faster than deletion of a node in singly linked list which is O(n)?
+1
A:
It has to do with the complexity of fixing up the next pointer in the node previous to the one you're deleting.
jeffamaphone
2009-12-13 06:53:51