2 ms·
If it's the same amount of work and readability is not sacrificed, consistently using O(n log n) is a good practice for that situation. If the result is more e
by wanorris 15y ago
If it's the same amount of work and readability is not sacrificed, consistently using O(n log n) is a good practice for that situation.
If the result is more effort or less readable, then an understanding of what n is going to be like is probably worthwhile. For the love of all that's holy, please do not optimize access to a collection of days of the week that is accessed infrequently.