On Tue, March 21, 2006 6:08 pm, jda wrote:
> Here is an example:
>
> Array(0) = 1,4,6
> (1) = 1,2
> (2) = 8,7,9
> (3) = 1,2
>
> should become
>
> (0) = 1
> (1) = 4,6
> (2) = 2
> (3) = 8,7,9
>
> Each item (number) now appears only once. And minimum groups are
> maintained (such as, 4,6 is one group).


This won't solve all the problems, but I have a dictionary-based set class
that looks ideal for this kind of problem. You'd have to add something to
it to maintain the unique number in each set, but the class has built-in
routines for difference, union, etc. so that shouldn;t be difficult to
add. I can email to you off list if you're interested.


-- 
Marc Zeedar
Publisher
REALbasic Developer Magazine
http://www.rbdeveloper.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to