Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LinkedList

Linked List data structure

Hierarchy

  • LinkedList

Constructors

constructor

  • Parameters

    Returns LinkedList

Properties

compare

compare: Comparator

head

head: null | LinkedListNode
property

Head of the linkedList

tail

tail: null | LinkedListNode
property

Tail of the linkedList

Methods

append

  • Parameters

    • value: any

    Returns LinkedList

delete

  • Parameters

    • value: any

    Returns null | LinkedListNode

deleteHead

  • Returns null | LinkedListNode

deleteTail

  • Returns null | LinkedListNode

find

  • Parameters

    • __namedParameters: findArg

    Returns null | LinkedListNode

fromArray

  • Parameters

    • values: any[]

    Returns LinkedList

prepend

  • Parameters

    • value: any

    Returns LinkedList

reverse

  • Returns LinkedList

toArray

  • toArray(): any[]
  • Returns any[]

toString

  • toString(callback?: function): string
  • Parameters

    • Optional callback: function
        • (value: any): string
        • Parameters

          • value: any

          Returns string

    Returns string