4 ms·
> It's easy to end up writing code that's got good algorithmic time complexity, but where the CPU spends its time sitting cold and waiting on RAM It’s been int
by nico 3y ago
> It's easy to end up writing code that's got good algorithmic time complexity, but where the CPU spends its time sitting cold and waiting on RAM
It’s been interesting preparing for coding interviews. Quite a few times, the “optimal” solution time-complexity wise, is slower than the brute force solution
Many of those it’s because of the inputs. If you know what they are or what their order distribution is going to be, you can usually do quite a lot better than the naive “ideal” solution