The type of the value stored in the deque
Append a value to the deque
The value to append to the deque
Append a value to the start of the deque
The value to append to the deque
Clear the deque
items to extend the deque with
items to add to the front of the deque
Pop the last value from the deque
The last value in the deque
Pop the first value from the deque
The first value in the deque
Generated using TypeDoc
A double ended queue using a double linked list, where .popLeft() and .appendLeft() will be a time complexity of O(1), as opposed to O(n) for .shift() and .unshift().
Example (es imports)
import { Deque } from 'spectrum-kit'; const deque = new Deque<number>([1, 2, 3]);Example (commonjs)
var Deque = require('spectrum-kit').Deque; var deque = new Deque<number>([1, 2, 3]);