I want to store objects indexed using 3 tuples (String, String, DateTime). Lets name these identifiers, categories, day
Any object in the data structure is guaranteed to be unique with the help of 3 tuples (no duplicates)
The data structure should support quick answers to questions such as:
- What are all the unique identifiers?
- What are the categories for the identifier "xyz"?
- What are the days when id = "xyz" and category "mycategory"?
Removal is also possible. It would be great to maintain a low memory profile.
As a base level, I use Dictionary <string, Dictionary <string, Dictionary <DateTime, object β β> </p> Theoretically, this should give me an O (1) search, but I'm not familiar with internal dictionaries and generally feel like mine The solution is not optimal.
I know that there is probably not a single correct answer here, and I could provide numerous usage data, but maybe someone can just give me some ideas for the game?
<b> Change
Only an equality search is performed (ie Identiifer = "xyz"). I do not use inequalities (more, less, etc.)
source share