Laophatgia / google-collections

Automatically exported from code.google.com/p/google-collections
Apache License 2.0
0 stars 0 forks source link

getByValue in BiHashMap #282

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Is it possible to getting Key by Value in BiHashMap? 

Original issue reported on code.google.com by kkazmier...@gmail.com on 30 Oct 2009 at 7:13

GoogleCodeExporter commented 8 years ago
Yes:  inverse().get().

Original comment by kevin...@gmail.com on 30 Oct 2009 at 2:10

GoogleCodeExporter commented 8 years ago
But method inverse() has O(n), so the minimum cost of inverse().get() is also 
O(n). Can 
we create any structure to getValues with smaller cost?

Original comment by kkazmier...@gmail.com on 30 Oct 2009 at 2:32

GoogleCodeExporter commented 8 years ago
I'm curious, where did you get the idea that inverse() is O(n)?

Original comment by kevin...@gmail.com on 30 Oct 2009 at 2:39

GoogleCodeExporter commented 8 years ago
OK it is O(1). Thanks for help :)

Original comment by kkazmier...@gmail.com on 30 Oct 2009 at 2:46