I want a data structure with the following operations:
- Random access delete: Take reference to object, delete from structure (elements are unique)
- Add element at end
- Bidirectional iteration
Random access deletion, and element appending should be possible during iteration.
A linked list hashset should theoretically support doing all of these in O(1) but I cannot seem to get LinkedHashSet to do these for me.
If there is an easy way to do it optimally I'd like to know. Otherwise, what's a good way able to cope with about 10k elements? All operations are performed roughly the same amount of times.