Skip to content

Commit c6a692b

Browse files
authored
Merge pull request kdn251#77 from GrammarAndShape/patch-1
updated linked list, stack, and queue
2 parents 2bce2b8 + 5cc1062 commit c6a692b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
pointing to the next node by means of a pointer. It is a data structure
6060
consisting of a group of nodes which together represent a sequence.
6161
* **Singly-linked list**: linked list in which each node points to the next node and the last node points to null
62-
* **Doubly-linked list**: linked list in which each node has two pointers p, n such that p points to the previous node and n points to the next node; the last node's n pointer points to null
62+
* **Doubly-linked list**: linked list in which each node has two pointers, p and n, such that p points to the previous node and n points to the next node; the last node's n pointer points to null
6363
* **Circular-linked list**: linked list in which each node points to the next node and the last node points back to the first node
6464
* Time Complexity:
6565
* Access: `O(n)`
@@ -70,7 +70,7 @@
7070
### Stack
7171
* A *Stack* is a collection of elements, with two principle operations: *push*, which adds to the collection, and
7272
*pop*, which removes the most recently added element
73-
* Last in, first out data structure (LIFO)
73+
* **Last in, first out data structure (LIFO)**: the most recently added object is the first to be removed
7474
* Time Complexity:
7575
* Access: `O(n)`
7676
* Search: `O(n)`
@@ -80,7 +80,7 @@
8080
### Queue
8181
* A *Queue* is a collection of elements, supporting two principle operations: *enqueue*, which inserts an element
8282
into the queue, and *dequeue*, which removes an element from the queue
83-
* First in, first out data structure (FIFO)
83+
* **First in, first out data structure (FIFO)**: the oldest added object is the first to be removed
8484
* Time Complexity:
8585
* Access: `O(n)`
8686
* Search: `O(n)`

0 commit comments

Comments
 (0)