J
Julia Jin
Hi, there,
I have a list of elements. Each time when a new data comes in, I need
to check if the new data exists in the list. If not exists, I need to
insert the new data into the list.
If I keep the list unsorted, when the length of the list becomes
large, it takes a long time to check if an elements exists in the list
or not.
In this case, which data structure should I use? Can anyone give me
some suggestion or a short piece of C code? Thanks!
Julia
I have a list of elements. Each time when a new data comes in, I need
to check if the new data exists in the list. If not exists, I need to
insert the new data into the list.
If I keep the list unsorted, when the length of the list becomes
large, it takes a long time to check if an elements exists in the list
or not.
In this case, which data structure should I use? Can anyone give me
some suggestion or a short piece of C code? Thanks!
Julia