There are q<=5*10^5 online queries of 2 types for a set of integers:
- Add an integer 1<=x<=10^9 to the set
- Remove an integer from the set
- Find the minimum element >=x that isn't present in the set
Is there a way to efficiently process these queries?
MEX Data structure
There are q<=5*10^5 online queries of 2 types for a set of integers:
Is there a way to efficiently process these queries?