I have a set of events - let's say [event1, event2, .., eventN]
and set of event handlers [handler1, handler2, .., handlerK]
and each handler could be assigned to several events. For example - Handler6
assigned to Event1, Event2, Event5
But my tipycal request is opposite - I need all handlers for selected event.
Is there any kind of data structure which could store this data correspondence in memory and retrieve data effectively (not worse than O(log(n))
)