Skip to content

Latest commit

 

History

History
139 lines (68 loc) · 1.56 KB

File metadata and controls

139 lines (68 loc) · 1.56 KB

LinkedList.LinkedList

add(item)

Add an item to the list

Arguments

  1. item (*): an item to add to the list

addAll([items])

Add multiple items to the list

Arguments

  1. [items] (T[]): an array of items to be added to the list

constructor([items])

Arguments

  1. [items] (T[]): an array of items to add to the list

constructor(data, next)

Arguments

  1. data (T):
  2. next (|T[]):

head

The head node in the list


remove(item)

Remove an item from the list

Arguments

  1. item (*): the item to remove from the list

Returns

(boolean): true if the item was successfully removed, false if not


size

(number): The number of items in the list


tail

The tail node in the list