[Bro] - set\table\vector types have a complexity of O(n) ?

Jan Grashöfer jan.grashoefer at gmail.com
Tue Apr 18 04:49:08 PDT 2017

> Just wondering, sets\tables\vectors all have a read\write complexity of
> O(n) ?
> n - referring to the number of elements in the container.

If I am not mistaken, sets as well as tables are implemented as hash
tables. Thus the average complexity for lookup and insert is O(1).
Vectors are implemented using C++ vectors, I think. I.e., lookup would
be O(1) while inserting depends on the context.


More information about the Bro mailing list