On Thu, Mar 6, 2014 at 3:48 PM, Roger Hui <[email protected]> wrote:
>> Suppose M is really large and the cost of setting count to 0 is
> prohibitive. How can you avoid that cost?
>> (Not saying it's related to finding the min or the max).
To clarify, do you mean how can you avoid the cost of this operation?
memset(b,0x00,sizeof(b));
In my example I was using:
for (; j < 32767; j++) {
count[j] = 0;
}
Is this the cost you are referring to?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm