isSlotAvailable of size maxNumbers with all values set to true.slotsAvailableQueue and enqueue all numbers from 0 to maxNumbers - 1.get(), dequeue a number from slotsAvailableQueue, mark it as unavailable in isSlotAvailable, and return it. If the queue is empty, return -1.check(number), return the value of isSlotAvailable[number].release(number), if isSlotAvailable[number] is false, enqueue number to slotsAvailableQueue and mark it as available in isSlotAvailable.