INADA Naoki added the comment: I think it violates O(1).
"s.add(x); s.discard(x);" loop creates dummy chain. Average chain length is determined by size of the set. So it is O(len(s)) rather than amortized O(1). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29476> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com