Hi
I want to create simple sets, say a bunch of different names,
and then go deleting a few of the names and perhaps adding some others, all the time knowing how big and small the set gets and knowing where each element is.
It seems to me natural to use a simple linked list for this. It fulfills all the needs, and I think performance should be OK, though later I might upgrade to doubly linked list to improve that aspect.
Would readers agree? In perl and python I've often seen recommendations for the use of associated arrays for set operations. C++ and Java have their own modules for this.
I haven't though of hash tables much in this respect, because I reckon linked lists are a more natural format. It would be interesting to hear other people opinion on this.
Many thanks!