<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Python Quicksort</title>
	<atom:link href="http://www.emgarten.com/python-quicksort.htm/feed" rel="self" type="application/rss+xml" />
	<link>http://www.emgarten.com/python-quicksort.htm</link>
	<description>Exploring the realms of code..</description>
	<lastBuildDate>Fri, 21 Jan 2011 01:27:47 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ashish</title>
		<link>http://www.emgarten.com/python-quicksort.htm/comment-page-1#comment-296</link>
		<dc:creator>Ashish</dc:creator>
		<pubDate>Fri, 26 Mar 2010 14:54:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.emgarten.com/python-quicksort.htm#comment-296</guid>
		<description>@Steve, your code won&#039;t work on following array

&gt;&gt; qsort([2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,2,3])
&gt;&gt; [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] #skips duplicate values

Correction:
def qsort2(items):
    if not items : return items
    pivot = items[0]
    return qsort2(filter(lambda x : x  pivot,items[1:]))

&gt;&gt; qsort2([2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,2,3])
&gt;&gt; [2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]</description>
		<content:encoded><![CDATA[<p>@Steve, your code won&#8217;t work on following array</p>
<p>&gt;&gt; qsort([2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,2,3])<br />
&gt;&gt; [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] #skips duplicate values</p>
<p>Correction:<br />
def qsort2(items):<br />
    if not items : return items<br />
    pivot = items[0]<br />
    return qsort2(filter(lambda x : x  pivot,items[1:]))</p>
<p>&gt;&gt; qsort2([2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,2,3])<br />
&gt;&gt; [2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve (Frostbyte)</title>
		<link>http://www.emgarten.com/python-quicksort.htm/comment-page-1#comment-274</link>
		<dc:creator>Steve (Frostbyte)</dc:creator>
		<pubDate>Thu, 23 Oct 2008 15:24:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.emgarten.com/python-quicksort.htm#comment-274</guid>
		<description>def qsort(items):
    count = len(items)
    if count &lt;= 1:
        return items
    pivot = items[0]
    return qsort(filter(lambda x: x &lt; pivot, items)) + [pivot] + sort(filter(lambda x: x &gt; pivot, items))</description>
		<content:encoded><![CDATA[<p>def qsort(items):<br />
    count = len(items)<br />
    if count &lt;= 1:<br />
        return items<br />
    pivot = items[0]<br />
    return qsort(filter(lambda x: x &lt; pivot, items)) + [pivot] + sort(filter(lambda x: x &gt; pivot, items))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve (Frostbyte)</title>
		<link>http://www.emgarten.com/python-quicksort.htm/comment-page-1#comment-273</link>
		<dc:creator>Steve (Frostbyte)</dc:creator>
		<pubDate>Thu, 23 Oct 2008 15:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.emgarten.com/python-quicksort.htm#comment-273</guid>
		<description>def qsort(items):
    count = len(items)
    if count &lt;= 1:
        return items
    pivot = items[0]
    return qsort(filter(lambda x: x  pivot, items))</description>
		<content:encoded><![CDATA[<p>def qsort(items):<br />
    count = len(items)<br />
    if count &lt;= 1:<br />
        return items<br />
    pivot = items[0]<br />
    return qsort(filter(lambda x: x  pivot, items))</p>
]]></content:encoded>
	</item>
</channel>
</rss>

