Data structure for an ordered set with many defined subsets; retrieve subsets in same order
- by Aaron
I'm looking for an efficient way of storing an ordered list/set of items where:
The order of items in the master set changes rapidly (subsets maintain the master set's order)
Many subsets can be defined and retrieved
The number of members in the master set grow rapidly
Members are added to and removed from subsets frequently
Must allow for somewhat efficient merging of any number of subsets
Performance would ideally be biased toward retrieval of the first N items of any subset (or merged subset), and storage would be in-memory (and maybe eventually persistent on disk)