4 ms·
Exactly because it is so. You have to compute as little as possible and make it O(1) for a row added and deleted, not O(window_size).
by thesz 4y ago
Exactly because it is so. You have to compute as little as possible and make it O(1) for a row added and deleted, not O(window_size).