News for hackers. Stuff that matters.
Re:O(n^2), again, now in Windows Management Instrumentation by thaumasiotes on Monday December 09, 2019 @04:39PM (#21746905)
> If this ("turn it into two not nested loops") was indeed intended, I'd suggest to spell it out, not abuse notation

O(2n) is not an abuse of notation. It's just as well defined as O(n). The fact that O(2n) is a subset of O(n) is a theorem, not part of the definition of the notation.

Re:O(n^2), again, now in Windows Management Instrumentation by enedil on Monday December 09, 2019 @06:40PM (#21747931)
It's a subset, but also a superset.
Re:O(n^2), again, now in Windows Management Instrumentation by thaumasiotes on Monday December 09, 2019 @06:46PM (#21748001)
Yes? But to replace O(2n) with O(n), you only need that it's a subset.
Re:O(n^2), again, now in Windows Management Instrumentation by enedil on Monday December 09, 2019 @08:07PM (#21748622)
You have your point.