I’m a bit confused about what data structure I can use to be able to do following tasks rather fast:
- Save tuples (can be changed to contain a keyword). Will be something like {UserInfo, Time, TimeLvl}
- Remove element knowing the tuple (or the keyword)
- Update all contained elements, changing one of the tuple’s elements about once a second (TimeLvl will get higher the longer the user waits).
The Contained data will change a lot as users come and go.
What would be the best data-structure for this use case?
Take a look at this article: Key-Value stores.
Than decide which of the data structures presented is best suited for you.
The article also provides a benchmark.
I personally like gb_trees, which is quite fast and easy to use.