You are given a range [m , n]
Consider them a licence plate number.
For regular customers you use numbers in sequence and for premium customers you can give out number which customer asks for and if its available.
Question is you need to perform both operation in O(1).
How can this be done
for e.g. range is 1000 -> 5000
normal customers: 1000, 1001, 1002, 1003.....
for premium customer: 1111,1221,1122 etc - it can be any number customer wants
Which DS to use for this problem, only constraint is time wise it must be O(1)