forked from Asiatik/codezilla
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec5114f
commit eaace6c
Showing
3 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Linked list | ||
|
||
A linked list is a collection of nodes which are connected to each other by pointers. A singly linked list has a pointer to the first node, and each node has a pointer to the next node. A double linked list has a pointer to the first and last node, and each node has a pointer to the next and previous node. Each node also contains data. | ||
|
||
Linked lists have a runtime of O(1) when inserting or reading data from the front of the list (and back for doubly linked lists), but have a runtime of O(n) when accessing a specific element in the list or searching the list. | ||
|
||
Images from Wikipedia under public domain. | ||
|
||
# Singly linked list diagram: | ||
![alt text](Singly-linked-list.png) | ||
# Doubly linked list diagram: | ||
![alt text](Doubly-linked-list.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.