Hi Mark, thanks for the feedback. I’ll have to take a look at article a little more carefully since I wrote it a while ago.
But the thinking behind O(1) space is that since the set of characters is constant, then the number of keys at most will be 26, one for each letter in the alphabet, though you can expand that to handle case sensitivity, numbers and special characters. And since the values are just integers, they also take up the same amount of memory.
If I’m making a mistake in that reasoning though definitely let me know and I’ll be happy fix the article. Thanks again for the input!