Re: storing numbers
Re: storing numbers
- Subject: Re: storing numbers
- From: Tom Davies <email@hidden>
- Date: Tue, 25 Jan 2005 10:49:22 +1100
How many numbers, and over what range?
A bit map would allow you to check for a number in constant time, but
uses O(n) space.
Tom
On Sat, 22 Jan 2005 19:51:38 -0500, Pierre Chatel <email@hidden> wrote:
> Hi,
>
> i need to store a large amount of integers (most of them are contiguous
> (e.g 1,2,3,4,5...), some are not; they can also be sorted), and to do
> *quick* research on that numbers (like: is that number a member of this
> "array"). Do u have a suggestion on the data type i should use ?
> NSArray is waaaaay to slow for quick searching.
>
> Thanks,
> Pierre
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> email@hidden
>
> This email sent to email@hidden
>
>
--
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden