According to the docs, scala.collection.mutable.LinkedList
is deprecated as of the 2.11 version. Unfortunately I have found nothing to replace it with. I need an ordered collection that can remove an item from any index in constant time.
What should I use?
Use MutableList and its iterator's remove
method. They provide O(1) removal.
http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#linked_lists
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With