Re: data structure question
- From: Richard Heathfield <invalid@xxxxxxxxxxxxxxx>
- Date: Fri, 14 Jul 2006 18:36:42 +0000
Jack said:
Richard Heathfield wrote:
Jack said:Is hashing table the correct answer? Thanks.
What is the best data structure for designing a telephone directory
which contains several millions items? WHat is spped of lookup? Thanks.
What do your lecture notes suggest?
Well, it wouldn't be a totally stupid answer, that's for sure.
The speed of lookup will depend on whether you can get a perfect hash for
your data, which is unlikely, I think, if you have millions of items. The
more buckets you have, the lower your collision rate, and the faster the
lookup.
Other possibilities include: B+-tree, trie.
As someone else said, the really right answer is "use a database", but your
teacher probably won't buy that.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.
- References:
- data structure question
- From: Jack
- Re: data structure question
- From: Richard Heathfield
- Re: data structure question
- From: Jack
- data structure question
- Prev by Date: Re: data structure question
- Next by Date: Re: What language for mathematical applications?
- Previous by thread: Re: data structure question
- Next by thread: Re: data structure question
- Index(es):
Relevant Pages
|