Skip to main content
2 events
when toggle format what by license comment
Jan 3, 2018 at 21:45 comment added Dan Oberlam I would assume that __eq__ for Counters will first do a size check before iterating over key/value pairs, which (is probably) constant time. In that case, the complexity is O(n). If we didn't feel confident that was part of it, we can add a length check of the strings first (which would be constant) in which case the equality comparison would definitely be O(n).
Jan 3, 2018 at 21:39 history answered Graipher CC BY-SA 3.0