3 ms·
The algorithm accesses each element in the input only once, and in order. It's like reading a big file. Just call read() repeatedly, and discard old data each
by knz42 11y ago
The algorithm accesses each element in the input only once, and in order.
It's like reading a big file. Just call read() repeatedly, and discard old data each time you call read() again.