Please enable JavaScript.
Coggle requires JavaScript to display documents.
Lists - Coggle Diagram
Lists
Basic operations
Search
Insert
Delete
Implementation
Linked lists
Sequence of nodes
Data
Pointer
Time to acess depends on positon of node
O(n)
Types
Singly linked list
Pointer to next node
Doubly linked list
Pointer to next node
Pointer to previous node
More flexible
Array
Same time to acess every item
O(1)
Used in Strings
Needs reservation of memory
Stored contiguously in memory
Special types
Queue
First-in First-out
Insert
Only at the end
Rear
Delete
Only at the start
Front
Stack
Insert
Delete
Only performed on the end
Top
Last-in First-out
Finite sequence of items