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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to