4 ms·
Without thinking about it too much... One solution might be to try and find the the best candidate after (N/M)/e candidates, rather than N/e candidates. Then f
by Cogito 13y ago
Without thinking about it too much...
One solution might be to try and find the the best candidate after (N/M)/e candidates, rather than N/e candidates. Then find the best candidate after (N_remaining/(M-1))/e candidates. That is recurse, by finding one candidate at a time, and discarding less then N/e each time to ensure you get enough candidates.