3 ms·
You're forgetting that algorithmic complexity deals with asymptotic behavior. An algorithm that takes N inputs, does N operations, and then sleeps for 10 secon
by fenomas 3y ago
You're forgetting that algorithmic complexity deals with asymptotic behavior.
An algorithm that takes N inputs, does N operations, and then sleeps for 10 seconds is not constant time, because in the asymptotic case the N iterations will take longer than the sleep.