Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.126 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.76; '*S*': 0.01; 'cc:addr:python-list': 0.10; 'wrote:': 0.17; 'previously': 0.18; 'posted': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'am,': 0.27; 'character': 0.29; "can't": 0.34; 'subject:?': 0.35; 'subject:: ': 0.38; 'received:192': 0.39; 'received:192.168': 0.40; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'average': 0.93 Date: Thu, 06 Sep 2012 10:23:45 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Johannes Bauer Subject: Re: Comparing strings from the back? References: <504564ba$0$29978$c3e8da3$5496439d@news.astraweb.com> <504761ef$0$29981$c3e8da3$5496439d@news.astraweb.com> <50477cbb$0$29981$c3e8da3$5496439d@news.astraweb.com> <50485fca$0$29977$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:8DamNan6+0LHLDevPNhQp0sckBseear54UKczh5kU7P l7mGDhafyYhkwNv7bAybYzBt6r74b5BFNdNObv8YNuJycdVJaM oQkQ6eAnH12GxZwPyhwPEo/ZyMzzQubykXVh5paWp65RNcdpDp PSXmSjOlidTLhyJH7bzoAxLeRHhGYNUgUiSlST2iugkCpnftDa vhE3gx0c+Av1zezhqzUiYhXrECsbINdsjCEFBkheaCVV+5/+Eu p4+Zbrhmd9HBZtUxazyUQv8lG0PUeSYvHC0JnO4FQrgnhhuErc qo/Jzwt8diH53wvcnaunEAXiHaQXPnZR03yPxNf+aktnMbwOw= = Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: d@davea.name List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1346941450 news.xs4all.nl 6900 [2001:888:2000:d::a6]:56654 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28600 On 09/06/2012 09:43 AM, Johannes Bauer wrote: > > Yes, worst-case is O(N), best case O(1). Average is O(n log n). Can't see how you came up with an average of n log(n). Fourteen minutes before you made this post, you demonstrated it was less than 2 for any N. And I previously posted that for a character set of size 10, the average was 1.1111 -- DaveA