3 ms·
Two algorithms that are both O(n) can be wildly different in execution times. More, an O(n) algorithm can be more "efficient" than an O(lg(n)) one, for some va
by taeric 6y ago
Two algorithms that are both O(n) can be wildly different in execution times.
More, an O(n) algorithm can be more "efficient" than an O(lg(n)) one, for some values of n. (Or just in another facet. Maybe you actually do care about space.)
- raldi 6y agoWe're talking about five-letter words. I'm pretty sure a 25-year-old computer could iterate over all of them in well under a second.
- taeric 6y agoHow does that change the point? The claim wasn't how to do it fast, per se. It was how to do it efficiently. And comparing two algorithms of the same order can have a wide difference in the answer.