Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LinkedList<T>

Type parameters

  • T

Hierarchy

  • LinkedList

Index

Constructors

constructor

  • new LinkedList<T>(arr?: Iterable<T>): LinkedList<T>

Properties

Private Optional _head

_head: undefined | Node<T>

Private Optional _tail

_tail: undefined | Node<T>

size

size: number = 0

Accessors

empty

  • get empty(): boolean

head

  • get head(): undefined | T

tail

  • get tail(): undefined | T

Methods

[Symbol.iterator]

  • [Symbol.iterator](): Generator<T, void, unknown>

Private _push

  • _push(item: T): void

Private _pushFront

  • _pushFront(item: T): void

Private _updateHeadAndTail

  • _updateHeadAndTail(): void

clear

  • clear(): void

pop

  • pop(): undefined | T

popFront

  • popFront(): undefined | T

push

  • push(...items: T[]): void

pushFront

  • pushFront(...items: T[]): void

toArray

  • toArray(): T[]

Generated using TypeDoc