4 ms·
> 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 ju
by thaumasiotes 7y ago
> 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.
- enedil 7y agoIt's a subset, but also a superset.
- thaumasiotes 7y agoYes? But to replace O(2n) with O(n), you only need that it's a subset.
- enedil 7y agoYou have your point.