I can think of ways of avoiding the cost cost of setting count to 0.

For example, use a sparse array implementation, with a default value of 0.

Not sure that that would be wise, though. Basically what you do is
avoid using counts for that case, I imagine.

-- 
Raul

On Thu, Mar 6, 2014 at 3:48 PM, Roger Hui <rogerhui.can...@gmail.com> 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).
>
> Well, what say you, collective wisdom of the J programming forum?
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to