Name: Anonymous 2008-03-10 6:52
Sup /prog/
I've come across a problem where I need something like a hash map, but I need to be able to go both ways. That is, I should be able to retrieve a value based on a key, obviously, but I should also be able to get to the key given a value. The key set and value set contain unique values. I require logarithmic lookup time in both cases.
Is there a way to do this, without using two hashtables? I'm using sepples btw
I've come across a problem where I need something like a hash map, but I need to be able to go both ways. That is, I should be able to retrieve a value based on a key, obviously, but I should also be able to get to the key given a value. The key set and value set contain unique values. I require logarithmic lookup time in both cases.
Is there a way to do this, without using two hashtables? I'm using sepples btw