Re: NSMutableArray fill with unique values from NSArray
Re: NSMutableArray fill with unique values from NSArray
- Subject: Re: NSMutableArray fill with unique values from NSArray
- From: Graham Cox <email@hidden>
- Date: Thu, 20 Aug 2009 22:54:34 +1000
On 20/08/2009, at 10:43 PM, Devraj Mukherjee wrote:
Is there are better way of doing this?
Use a NSMutableSet, which only accepts unique objects. You can turn it
into an array later.
However you can probably do this just as easily with an array,
avoiding the slowdown at the end, if you change your algorithm a bit.
Isn't this pretty much the same as the "shuffle" question discussed
last week?
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden