Comparing strings from the back?
Johannes Bauer
dfnsonfsduifb at gmx.de
Thu Sep 6 10:34:10 EDT 2012
On 06.09.2012 15:43, Johannes Bauer wrote:
> Wrong, at least for randomized strings (i.e. every character with the
> same probability). O(N) is worst-case, O(log N) is correct for
> randomized strings.
^^
Here I write the right thing. Then further below...
> Yes, worst-case is O(N), best case O(1). Average is O(n log n).
...I write the wrong thing. O(log n) is what I meant, as Dave correctly
noticed.
Best regards,
Johannes
--
>> Wo hattest Du das Beben nochmal GENAU vorhergesagt?
> Zumindest nicht öffentlich!
Ah, der neueste und bis heute genialste Streich unsere großen
Kosmologen: Die Geheim-Vorhersage.
- Karl Kaos über Rüdiger Thomas in dsa <hidbv3$om2$1 at speranza.aioe.org>
More information about the Python-list
mailing list