Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20417

RE: name of a sorting algorithm

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ramit.prasad@jpmorgan.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'completeness': 0.05; 'bubble': 0.09; 'combines': 0.09; 'correct.': 0.09; 'to:name :python-list@python.org': 0.15; '712': 0.16; '>it': 0.16; '>well,': 0.16; 'adjacent': 0.16; 'currencies': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'from:addr:jpmorgan.com': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'securities,': 0.16; 'swaps': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'wrote:': 0.18; 'holds': 0.21; 'header:In- Reply-To:1': 0.22; '>the': 0.23; 'elements': 0.24; 'received:169': 0.28; 'received:169.254': 0.28; 'pass': 0.29; 'extreme': 0.29; 'temporary': 0.29; 'received:155': 0.30; 'received:159': 0.30; 'accuracy': 0.32; 'does': 0.32; 'sort': 0.33; 'end.': 0.34; 'searches': 0.34; 'to:addr:python-list': 0.35; 'phone:': 0.35; 'element': 0.37; 'charset:us-ascii': 0.37; 'to:addr:python.org': 0.40; 'selection': 0.40; 'range': 0.61; 'subject': 0.61; 'offers': 0.62; 'subject:name': 0.67; 'information,': 0.69; 'legal': 0.72; 'url:email': 0.72; 'bank': 0.75; 'sale': 0.75; 'investment': 0.77; 'purchase': 0.78; 'received:169.254.8': 0.84; 'swap': 0.84; 'wilson,': 0.84; 'inefficient': 0.91
X-DKIM OpenDKIM Filter v2.1.3 sz4.jpmchase.com q1EKDCEC019719
DKIM-Signature v=1; a=rsa-sha256; c=simple/simple; d=jpmorgan.com; s=smtpout; t=1329250392; bh=PAPld2K/V6ToHZMa3oOoW1dYeaQ8cGrKkO5fnq8ZMTI=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=YkU4k3c9d387L+32nRnjXOQopltAPjgLPuqQaNV6n2li3gpLIy2FVgPh8TR+PYFjy 4PyEhrCT+zdjS0Z+zHxM6iWuyaNv0Aznl5Vq+IPbyphgz58FmcgQfSQx/CsMSfWLZe KInfwJ/9wxrnc5VSTxyXNbkjUekOhGSv1iLy8NwI=
From "Prasad, Ramit" <ramit.prasad@jpmorgan.com>
To "python-list@python.org" <python-list@python.org>
Subject RE: name of a sorting algorithm
Thread-Topic name of a sorting algorithm
Thread-Index AQHM6zflv4mkGtJ7JUu+b8AREYi1aJY80qNA
Date Tue, 14 Feb 2012 20:13:04 +0000
References <mailman.5800.1329231688.27778.python-list@python.org> <jhducq$kui$1@speranza.aioe.org> <mailman.5804.1329235868.27778.python-list@python.org> <jhe31a$2ui$1@speranza.aioe.org>
In-Reply-To <jhe31a$2ui$1@speranza.aioe.org>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-originating-ip [10.67.79.38]
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-DLP-FWD Yes
Content-Type text/plain; charset="us-ascii"
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5812.1329252075.27778.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1329252075 news.xs4all.nl 6972 [2001:888:2000:d::a6]:50185
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20417

Show key headers only | View raw


Wilson, Mel wrote:
>Well, the classic bubble sort swaps adjacent elements until the extreme one 
>gets all the way to the end.  This sort continually swaps with the end 
>element during one pass until the end element holds the extreme.  Then it 
>shrinks the range and swaps then next less extreme into the new end element.  
>It does extra swaps because it combines the swap operation with recording 
>the temporary extreme while it searches the subrange.

My apologies, you are correct. It is a selection sort, just an 
inefficient one. 

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

name of a sorting algorithm Jabba Laci <jabba.laci@gmail.com> - 2012-02-14 16:01 +0100
  Re: name of a sorting algorithm Mel Wilson <mwilson@the-wire.com> - 2012-02-14 10:25 -0500
    RE: name of a sorting algorithm "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-02-14 15:50 +0000
      RE: name of a sorting algorithm Mel Wilson <mwilson@the-wire.com> - 2012-02-14 11:44 -0500
        RE: name of a sorting algorithm "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-02-14 20:21 +0000
        RE: name of a sorting algorithm "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-02-14 20:13 +0000
  Re: name of a sorting algorithm Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-02-14 16:33 +0100

csiph-web