07-21-2009 07:51 PM - edited 07-21-2009 07:52 PM
If you also want the boolean array ouput, you could also do e.g. as follows.
07-22-2009 01:03 PM
Sweet!
So, the fact that the array size is preset allocates the memory and avoids thrashing, then the array is trimmed, nice solution, thanks. It churns out the solution array very quickly.
I've used arrays quite a bit in the program I've written and supported over the last few years, weird I never ran into it before. I'll haev to have a look and see if there are any places I may have this happening, but with such a time impact (thrashing), I must have just avoided it by luck!