5 ms·
Average O(1), worst case O(n) So worse than a B-tree or a Red-black tree for the worst case.
by bufferoverflow 8y ago
Average O(1), worst case O(n)
So worse than a B-tree or a Red-black tree for the worst case.
- ant6n 8y ago"Average O(1)" is an oxymoron. Big Oh is about the worst case. The only thing that makes sense is "Amortized O(1)", but I believe its possible to create access cases where hash tables are slower.