1. Difference Between Singly Linked List and
Circular Linked List
2.
Difference Between Array and List
3.
Difference Between Singly Linked List and
Doubly Linked List
1. Difference Between Singly Linked List and Circular Linked List
Singly Linked List
|
Circular Linked List
|
In Singly Linked List LINK
|
In Circular Linked List LINK
|
In singly Linked List if we are at middle of the list
|
In circular linked list last node contains an address of
|
In Singly Linked List LINK
|
In Circular Linked List LINK
|
2. Difference Between Array and List
Array
|
List
|
Array
|
Linked list is an ordered collection of elements which
are connected by pointers.
|
In array, elements
|
In linked list, elements can’t be accessed randomly but
|
In array, elements are stored in consecutive memory
location.
|
In linked list, elements are not stored in consecutive
memory location.
|
Insertion & Deletion takes
|
Insertion & Deletion are fast & east in linked list as only value of pointer
|
In array, memory is allocated at compile time i.e. Static
Memory Allocation.
|
In linked list, memory is allocated at run time i.e.
Dynamic Memory Allocation.
|
Array
|
Linked list can be singly, doubly or circular linked
list.
|
In array, no pointers are used like linked list so no need
|
In linked list, pointers are used and for that extra
memory space is needed.
|
3. Difference Between Singly Linked List
and Doubly Linked List
Singly Linked
List
|
Doubly Linked
List
|
In singly linked list each node
Info : Contains value
Link : Contains address of next
node
|
In doubly linked list each node
Info : Contains value
RPTR : Contains address of next
node
LPTR : Contains address of
previous node
|
Occupies less memory as compared to doubly linked list.
|
Occupies more memory as compared to singly linked list.
|
In singly linked list
|
In doubly linked list
|
Insertion and deletion
operation are more complex in singly linked list.
|
Insertion and deletion
operation are performed easily in
doubly linked list.
|
Post a Comment
Please do not enter any spam link in the comment box.