3 ms·
> Nobody sorts by comparing all N! permutations and picking the correct one. (Well, I certainly don't.) You can usually make a problem seem harder than it act
by mayank 10y ago
> Nobody sorts by comparing all N! permutations and picking the correct one. (Well, I certainly don't.)
You can usually make a problem seem harder than it actually (from a complexity point of view) is by phrasing it in terms of directly picking from permutations or combinations.
An example: finding the longest common substring for N strings can also be phrased as picking from a quadratic number of of substrings, but has a linear-time algorithm (using suffix trees).