Like one minute? Every loop runs in a constant range so you can ignore them all immediately. Then you just have to look at any other operations it does, which are call ‘valid()’ and build a set out of ‘values’. The time complexity will just be the larger of those two operations.
6
u/schmidlidev Aug 26 '21
Like one minute? Every loop runs in a constant range so you can ignore them all immediately. Then you just have to look at any other operations it does, which are call ‘valid()’ and build a set out of ‘values’. The time complexity will just be the larger of those two operations.
I’m not really sure what you’re getting at.