I have to sort a large list (more than 10,000 elements). On adding an element I have to insert it on the right place. I saw that an ArrayList
will shift all the element that are after the insertion point.
How do all the different implementation of the List
interface behave in such a case? And what are the pros and the cons when choosing one implementation over the other?