I have an array containing names of items.
I want to give the user the option to create items without specifying their name, so my program will have to supply a unique defau
If there will be only one user accessing this array, why not use the number of nanoseconds? This, of course, assumes that the user is much slower than a computer, which seems to be a safe assumption.
That way, you have a O(1) cost for determining a unique name.