6 ms·
Yes, you are right about advancing the start of the window until uniqueness is restored. So, basically just advance it by 1. You could definitely use two index
by mateo411 4y ago
Yes, you are right about advancing the start of the window until uniqueness is restored. So, basically just advance it by 1.
You could definitely use two indexes instead of a queue, and using indexes over an array will be faster than using a queue.