C
Christian Christmann
Hi,
I'm looking for a data structure where I can store
arbitrary elements and than efficiently check if an
element (of same type as the stored elements) is contained
in the list. The latter operation is performed pretty
frequently, so the data structure I require must handle
it with low komplexity.
My idea was to use a STL set and then do something like
myset.find( element2Search ) != myset.end()
For sorted associative containers the "find" function
has a logarithmic complexity. Are there any approaches
with linear complexity?
Regards,
Chris
I'm looking for a data structure where I can store
arbitrary elements and than efficiently check if an
element (of same type as the stored elements) is contained
in the list. The latter operation is performed pretty
frequently, so the data structure I require must handle
it with low komplexity.
My idea was to use a STL set and then do something like
myset.find( element2Search ) != myset.end()
For sorted associative containers the "find" function
has a logarithmic complexity. Are there any approaches
with linear complexity?
Regards,
Chris