I tried to find an appropriate data structure for my data array. I prefer the one that supports insertion operation (insert in the middle of the list).
If there is no such Java built-in data structure, what is a good way to implement?
E.g. If I use ArrayList<String>
, which seems not support insertion in the middle of the list, how to implement the insert(int pos, String str)
in a good way?