Suppose I am given a range of integer (for example, from 1 to 8000000). These integers are represented as an ID for an item. The program can detach that integer from an item such that next item can reuse it.
Store an individual integer in a database row is not feasible as it can goes up to couple billions integer there.
I am thinking to use interval tree to find the 'gap' but then I need to store it in a mysql database.
Is there any other choice?
Note: It is not a college homework. :)