LinkedList::remove

(Available since version 1.0)

LinkedList::removeRemove/extract the item at the specified index

Description

public mixed LinkedList::remove ( int $offset )

Remove the item at the specified index, shuffling the next value (and all subsequent values) down through the list.

Note:

Similar to LinkedList::add() this method runs in Θ(n) amortized time due to the required seek operation.

Parameters

offset

The index of the item to be removed.

Return Values

The removed item.

Errors/Exceptions

Throws SEIDS::LinkedLists::OutOfRangeException when index is out of bounds or when index cannot be parsed as an integer.

To Top