removeAt

open override fun removeAt(index: Int): E

Remove and return the element at index, also removing the corresponding weight.

Return

removed element

Parameters

index

index of element to remove

Throws

if index invalid

Complexity: O(n) due to shift.