I want to implement a Set in C. Is it OK to use a linked list, when creating the SET, or should I use another approach ?
How do you usually implement your own set (if ne
Since you already have a linked list implemented, the easiest is a skip list. If you want to use balanced trees, the easiest in my opinion is a treap. These are randomized data structures, but generally they are just as efficient as their deterministic counterparts, if not more (and a skip list can be made deterministic).