C - How to implement Set data structure?

Posted by psihodelia on Stack Overflow See other posts from Stack Overflow or by psihodelia
Published on 2010-04-13T15:15:04Z Indexed on 2010/04/13 15:23 UTC
Read the original article Hit count: 218

Filed under:
|
|
|
|

Is there any tricky way to implement a set data structure (a collection of unique values) in C? All elements in a set will be of the same type and there is a huge RAM memory.

As I know, for integers it can be done really fast'N'easy using value-indexed arrays. But I'd like to have a very general Set data type. And it would be nice if a set could include itself.

© Stack Overflow or respective owner

Related posts about c

    Related posts about math