I have 3 data structures:
- A set of strings like {"Jack" , "Jason" , "Joe" , ...}
- A set of (string, int) like {("Jack" , 10) , ("Jason" , 14) , ("Joe" , 11) , ...}
- A set of (string, int, int) like {("Jack" , 10 , 5) , ("Jason" , 14 , 0) , ("Joe" , 11 , 20) , ...}
By the way:
- Each string is light (just a username) and unique so all set members are unique.
- I need operations like unions, intersections, subtraction, and comparison on all of them.
- I need operations to be fast enough.
- Members of each set may exceed a few thousands.
- I need all of them to be persistent and saved for other application sessions.
According to above, which way you suggest? SharedPreferences or sqlite or file or what? I don't know which is better. Thanks in advance.