Friday, 16 September 2011

Difference between Singly Linked List and Doubly Linked List


Difference between Singly Linked List and Doubly Linked List
Sno
Singly Linked List
Doubly Linked List
1.
We can access the nodes Only one direction. (Left to Right)
Two way directions. Left to right or Right to left
2.
Occupies less memory
Occupies much memory compares to SLL, as dll have two pointers (l, r)
3.
Complexity of insertion and deletion at known position is 0(n)
Complexity of insertion and deletion at known position is 0(1)
4.
Less performance
Fast performance
5.
Sll node contains at least two data members: 1) data (2) link field
DLL node contains at least three fields 9data members: 1. Llink (2) data (3) rlink



Types of Linked list

No comments:

Post a Comment