in reply to Re^2: Size-limited, fitness-based lists
in thread Size-limited, fitness-based lists
wouldn't a heap grow to include all items first before you extract the relevant ones
Yes, but I don't see a way to avoid that and yet satisfy your requirement to include all of the members of a class even if that causes the "minimum" to be exceeded. For example, what do you think we should do if the input list consists of a million words all of exactly the same length? If the "size-limited" aspect of the need is strong enough to make us discard some of that set of values, then you need to specify your "cut-off" heuristics somehow.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Size-limited, fitness-based lists (size, ties)
by tye (Sage) on Aug 10, 2015 at 21:41 UTC |