3 ms·
The best algorithm depends upon the data presented. What is the: - Average number of parameters - The % that are already sorted - The % that don't have keys
by icefox 14y ago
The best algorithm depends upon the data presented. What is the:
- Average number of parameters
- The % that are already sorted
- The % that don't have keys that start with same letter
- csense 14y agoIt also depends on the assumptions we make about the problem. - Do we have to validate the URL strings in any way? - What do we need to do with duplicate names? - Are cases with small parameter names and/or small numbers of parameters common? - How common are parameters with lengthy common prefixes? - Is there a bound on the length of the longest common prefix of two different parameter names? Tuning or special-casing with common cases in mind can often produce big wins.