[Python-ideas] set.add() return value
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Feb 13 23:43:42 CET 2009
Ralf W. Grosse-Kunstleve wrote:
> I didn't know such a process is considered
> O(1). I agree it is fair because in practice it seems to work very
> well, but the "collisions" part can turn it into O(N)
The very worst possible case is probably something
greater than O(1), but it's so unlikely to happen
in practice that this is usually ignored.
--
Greg
More information about the Python-ideas
mailing list