Consider I mint 10 CryptoDoggy NFTs, each with an incrementing ID, starting at 0. I also have a uint => uint mapping, which records the position of the NFT using its ID as a key. Initially, its position will be equal to its ID. So the 5th CryptoDoggy I mint will have ID 4 and position 4.
Now, say that I wish to burn the CryptoDoggy with ID 5. The CryptoDoggy with ID 6 is now in position 5, and likewise with all IDs above 5.
But, updating the positions by looping over the whole mapping is not an option if CryptoDoggy creation is unbounded.
So how, for example, would I get the position of the CryptoDoggy with ID 8, without looping over anything unbounded?