Skip to main content
Module

x/ssds/mod.ts>LinkedListDeque

Some Specialized Data Structures for Deno.
Latest
class LinkedListDeque
implements Deque<T>
import { LinkedListDeque } from "https://deno.land/x/ssds@0.2.0/mod.ts";

A deque implementation using a linked list as its principle data structure.

Constructors

new
LinkedListDeque(other?: LinkedListDeque<T>)

Constructs a LinkedListDeque.

If 'other' is not specified, will make an empty LinkedListDeque. Otherwise, makes a deep copy of 'other'.

Properties

private
_length: number
private
_sentinel: Link<T>

Methods

private
_first(): Link<T>
private
_isValidIndex(index: number): boolean

Determines if an index is valid or not.

private
_last(): Link<T>
addFirst(item: T): void
addLast(item: T): void
get(index: number): T
isEmpty(): boolean
printDeque(): void
size(): number