0

I want to temporary store some mapping data. The mapping is one to one. I saw this was solved in Python by wrapping two dictionaries in one class. In this case the O for getting mapped value would be O(1). I wan't the same thing. Does .Net already have such structure or I have to implement my own with two dictionaries?

Gordon Bell
  • 12,709
  • 3
  • 43
  • 64
Sergej Andrejev
  • 8,821
  • 11
  • 68
  • 108

1 Answers1

4

You have to implement it using two dictionaries. There's no built-in type in the base class library that efficiently supports indexing both by key and value.

mmx
  • 402,675
  • 87
  • 836
  • 780