name of a sorting algorithm

Prasad, Ramit ramit.prasad at jpmorgan.com
Tue Feb 14 21:13:04 CET 2012


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.  



More information about the Python-list mailing list