3 ms·
for insert/remove you also need to move the last element up for each deque with higher indices, and If I understand it correctly, there should be O(N^(2/3)) (i.
by ant6n 7y ago
for insert/remove you also need to move the last element up for each deque with higher indices, and If I understand it correctly, there should be O(N^(2/3)) (i.e. N^1/3 * N^1/3) such deques.