I know when deleting items from an array, the common practice it to read the array from bottom to top so the number of items in the array never becomes less than the index being referenced…
But how does one do the same thing with a Dictionary (since the physical order is “random”)
I have two things I need to do.
- Delete all items from the dictionary where the key is or matches a particular pattern (keys are PAIRS), so it may be “DELETE if key.left=“X”” or it might be “DELETE is key=pair(3:2)”
- Alter a series of keys … “IF key.right>5 then key.right=key.right+1” … without raising an issue by creating a conflicting key
The more I think about this, the more an in-memory database might be better than a dictionary