vault backup: 2025-01-30 09:27:31
This commit is contained in:
27
Data Structures/AI Notes/Double linked lists.md
Executable file
27
Data Structures/AI Notes/Double linked lists.md
Executable file
@@ -0,0 +1,27 @@
|
||||
## Advantages
|
||||
|
||||
- This has the advantage of making certain actions easier to perform but at the cost of increased maintenance of the code overall.
|
||||
|
||||
- Allows traversal of nodes in both direction which is not possible in singly linked list.
|
||||
|
||||
- Can allocate or de-allocate memory easily when required during its execution.
|
||||
|
||||
- It is one of most efficient data structure to implement when traversing in both direction is required.
|
||||
## Disadvantages
|
||||
|
||||
- Using extra memory when compared to array and singly linked list.
|
||||
|
||||
- Slow in search as its elements are stored randomly in memory, hence elements are accessed sequentially (no direct access is allowed).
|
||||
|
||||
## ADT Liner list could be implemented by two ways:
|
||||
|
||||
- Array
|
||||
- Used when you search is the highest priority
|
||||
|
||||
- Linked list
|
||||
- Singly linked list
|
||||
- Used when you addition/deletion is the highest priority
|
||||
|
||||
- Doubly linked list
|
||||
- Used when you addition/deletion is the highest priority
|
||||
- Navigate next and pervious
|
Reference in New Issue
Block a user