This problem is troubling me from so long time.
There are N scientists, K black holes, and any scientist can query about radius, size and temperature of any blackhole.
You have to answer three kinds of query basically:
1)Given Scientist queried for which blackholes,Given scientist queried for which attributes
2) Given blackhole, who all scientist had quaried on it, which attributes of it had been queried upon
3) Given attribute which scientist has queried upon it and which blackhole has it been queried upon
All should be in O(1) time complexity.
Which data structure will you use for this?