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
  • 5,380
  • 10
  • 55
  • 111

0 Answers0