//
sign in
Post
by @danabra.mov
PostEmbed
by @danabra.mov
Record
by @jimpick.com
Record
by @atsui.org
+ new component
Post
If you find yourself doing containment checks inside a loop, your code has an O(n) operation for each step of another O(n) operation, making it O(n*n). For more on this topic, see my article on the time complexities of different data structures in Python: pym.dev/time-complex...
The time complexity of common operations on Python's many data structures.
1d
pym.dev
Python Big O: the time complexities of different data structures in Python
Trey Hunner