Is there any built-in data structures in java can provide efficient performance for sorted lists? I also need to modify the sorted list including insertion and removal operations. I use arraylist at first. I am thinking the performance of an arraylist may not be good enough in the case of insertion and removal. what kind of data structure is good to use instead? If no built-in data structure is fast enough, which direction can I go before I design a custom data structure?
Asked
Active
Viewed 250 times
0
-
You should probably see: [why-there-is-no-sortedlist-in-java](http://stackoverflow.com/questions/8725387/why-there-is-no-sortedlist-in-java). There's no sorted, linked list class in the Java standard libraries. If you need one, write it yourself, though the standard list classes should suffice in terms of effiency and speed. – Dec 17 '13 at 18:33
1 Answers
0
I would look into a SortedMap interface, located in java.util I believe.
Good luck!

AFrieze
- 844
- 1
- 10
- 26