Data structure for an ordered set with many defined subsets; retrieve subsets in same order
Posted
by
Aaron
on Stack Overflow
See other posts from Stack Overflow
or by Aaron
Published on 2011-01-13T15:11:48Z
Indexed on
2011/01/14
7:53 UTC
Read the original article
Hit count: 206
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)
© Stack Overflow or respective owner