0.0.7 • Published 2 years ago
@zimtsui/deque v0.0.7
deque
A double-ended queue with support for negative subscripts.
Comparison
Why not petkaantonov/deque?
Because it returns undefined
rather than throws when range errors occur, and it takes time of O(n) to get an iterator.
Time complexity
- push/pop/shift/unshift: O(1) on average
- random access: O(1)
- get iterator: O(1)