由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - An interview question
相关主题
Re: How to represent n:n relationship inSortedSet的问题
Re: weird problem with hashtable--CONCLUSIONJava大侠们:Hashtable help please!
Re: hashtableJava 面试常见问题!
answer Re: how HashMap/Hashtable compare key?Help
[转载] Pair in java???reverse the bit order of a byte
a simple java programming questionjava的源程序值得看看
ObjectOutputStream.writeObject(Hashtable) ?HashMap cache
问个Hashtable的问题Java的工作面试主要考什么?主要是算法吗?
相关话题的讨论汇总
话题: phone话题: name话题: question话题: interview话题: use
进入Java版参与讨论
1 (共1页)
B***r
发帖数: 79
1
You use hashtable to find phone given name, what kind of data structure
would you use to find “phone by name” and “name by phone”?
I can create a reverse map. But there should be a better solution.
Thx!
G****o
发帖数: 155
2
is it 1 to 1 no duplicate name for the same phone number?
i think you can use two dictionary. hehe
F****n
发帖数: 3271
3
Bidirectional Map. Search BidiMap

【在 B***r 的大作中提到】
: You use hashtable to find phone given name, what kind of data structure
: would you use to find “phone by name” and “name by phone”?
: I can create a reverse map. But there should be a better solution.
: Thx!

B***r
发帖数: 79
4
Got it. Thanks!
1 (共1页)
进入Java版参与讨论
相关主题
Java的工作面试主要考什么?主要是算法吗?[转载] Pair in java???
问个hashtable实现问题a simple java programming question
java里面使用icon的问题 ObjectOutputStream.writeObject(Hashtable) ?
如何遍历hashtable里边的每一项?问个Hashtable的问题
Re: How to represent n:n relationship inSortedSet的问题
Re: weird problem with hashtable--CONCLUSIONJava大侠们:Hashtable help please!
Re: hashtableJava 面试常见问题!
answer Re: how HashMap/Hashtable compare key?Help
相关话题的讨论汇总
话题: phone话题: name话题: question话题: interview话题: use