0

When adding large amount of elements in java, it might be really costly to sort the list after inserting the items or sort the list as the items are being inserted. I was looking for a collection that inserts the item in the correct position from the start. I know about sorted sets, but sorted sets eliminates duplicates. What if I need the duplicates to be in my list?

0 Answers0