3 ms·
They didn't say it uses O(1) complexity: > Analyzing the above approach, we have an algorithm that takes O(n) time and uses O(1) space.
by zepolen 8y ago
They didn't say it uses O(1) complexity:
> Analyzing the above approach, we have an algorithm that takes O(n) time and uses O(1) space.