remove

open override fun remove(element: E): Boolean

Remove the first occurrence of element from the list (and its weight).

Return

true if the element was present and removed, false otherwise

Complexity: O(n) to locate and shift elements.

Parameters

element

element to remove