klyn.collections.LinkedList.removeAt
method
public native removeAt(index as Int) as Void
Description

Removes the element at the requested index.

Removing the head or tail is constant-time. Removing an element in the middle requires linear traversal to locate its node.

Parameters
ParameterDescription
indexZero-based index of the element to remove.
Throws
  • IndexException if index is outside [0, size).
Example
import klyn.collections

data = LinkedList<Int>([10, 20, 30])
data.removeAt(1)
print(data)  # l:[10, 30]