4 ms·
Or, phrased differently, if n has an upper limit, the algorithm is O(1).
by lassejansen 1y ago
Or, phrased differently, if n has an upper limit, the algorithm is O(1).
- connicpu 1y agoAs long as you have tests that regularly exercise your algorithm at n=max where you would notice if they were exceptionally slow