Simple Problem but tough for me if i want it in linear time
Tim Chase
python.list at tim.thechases.com
Wed Aug 18 23:19:14 EDT 2010
On 08/18/10 21:47, Steven D'Aprano wrote:
> Frankly, I think the OP doesn't really know what he wants, other than
> premature optimization. It's amazing how popular that is :)
You see, the trick to prematurely optimizing is to have a good
algorithm for prematurely optimizing...the real question them
becomes "How can I optimize my premature-optimization algorithms
to O(1) instead of O(newsgroup)?"
:-)
-tkc
PS: I'm not positive, but O(newsgroup) may asymptotically
approach O(log n) if the question is well formed, but O(2^n) if
flaming, indentation/line-length preferences, the meaning of OOP,
SQL-parameter escaping, McNugget combinations, or suggestions
that Python is "just a scripting language" are involved...
More information about the Python-list
mailing list