views:

65

answers:

2

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
+1  A: 

Because you can't look backwards...

Paul