Skip to content

Commit 606d36f

Browse files
author
majid shahbaz
committed
Added stack and queue methods implementations
1 parent 0c21fde commit 606d36f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datastructures/lists/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ print(_stack)
110110

111111
#### FIFO or LILO (First out First out || Last in Last out)
112112

113-
t is also possible to use a list as a queue, where the first element added is the first element retrieved (“first-in, first-out”); however, lists are not efficient for this purpose. While appends and pops from the end of list are fast, doing inserts or pops from the beginning of a list is slow (because all of the other elements have to be shifted by one).
113+
It is also possible to use a list as a queue, where the first element added is the first element retrieved (“first-in, first-out”); however, lists are not efficient for this purpose. While appends and pops from the end of list are fast, doing inserts or pops from the beginning of a list is slow (because all of the other elements have to be shifted by one).
114114
To implement a queue, use collections.deque which was designed to have fast appends and pops from both ends.
115115

116116
Example:

0 commit comments

Comments
 (0)