* Append an item to the tail. O(1) amortized.
(item)
| 33 | * Append an item to the tail. O(1) amortized. |
| 34 | */ |
| 35 | push(item) { |
| 36 | if (this.#size > this.#mask) { |
| 37 | this.#grow(); |
| 38 | } |
| 39 | this.#backing[(this.#head + this.#size) & this.#mask] = item; |
| 40 | this.#size++; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Prepend an item to the head. O(1) amortized. |
no test coverage detected