0

According to https://wiki.python.org/moin/TimeComplexity, x in s operation take O(n) in worst case.

Since set use hash internally, I think it should be O(1) instead of O(n)?

user3595632
  • 4,692
  • 8
  • 43
  • 95

0 Answers0