3 ms·
A hash table has E[O(1)] inserts and lookups. Most people ignore the expected part and just say those operations are O(1). Asymptotic complexity is of course o
by sagarm 5y ago
A hash table has E[O(1)] inserts and lookups. Most people ignore the expected part and just say those operations are O(1).
Asymptotic complexity is of course only loosely correlated with speed. In real systems with real workload sizes, constant factors matter a lot.