Reputation: 1785
I'm in need to lookup the key from a particular element. It doesn't have to be very fast, but it should be better that iterating through all values.
In particular, this is my problem space:
Does anyone know a datastructure that's useful in this situation, or would it be better to just have a map and a multimap side by side?
Solved. I actually ended up requesting the user give the key too. From an oo standpoint a horrible solution, but from a performance standpoint way faster. Dince the method I need the lookup for has a value parameter, the user can store the key next to the value.
Upvotes: 1
Views: 95