4 ms·
O(N) brute force algorithms (almost) never beat hashing. O(log(N)) tree-based algorithms sometimes do, because it’s easier to get good data locality out of the
by stephencanon 13y ago
O(N) brute force algorithms (almost) never beat hashing. O(log(N)) tree-based algorithms sometimes do, because it’s easier to get good data locality out of them when the queries have some temporal relation.