3 ms·
You can just use this algorithm but ignore everything after the first k elements. The algorithm still works if you don't store anything beyond the first k eleme
by shiandow 10mo ago
You can just use this algorithm but ignore everything after the first k elements. The algorithm still works if you don't store anything beyond the first k elements but just pretend they are there.