[Pdx-pm] [SOLUTION] Telephone number sorting
Joshua Keroes
jkeroes at eli.net
Fri Sep 27 20:15:23 CDT 2002
On (Fri, Sep 27 17:38), mikeraz at PATCH.COM wrote:
> On Fri, Sep 27, 2002 at 04:53:02PM -0700, Joshua Keroes typed:
> > > Q: What's the fastest, most space-efficient way to sort all
> > > of Portland's 503 phone numbers?
> >
> > A: Use a bit vector. To allocate enough space for all
> > 10,000,000 numbers, allocate 10,000,000 bits. [1]
> >
> > To signify that a telephone number is in use, turn the bit on.
> >
> > e.g. to indicate that the number 411 is in use, turn the 411th bit on.
>
> Did I miss the begining of this thread or is that solution
> unrelated to the problem description?
Must be the latter. The Q: at the top is from the original email.
-J
More information about the Pdx-pm-list
mailing list