<?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: Computer Algorithms: Bubble Sort</title>
	<atom:link href="/2012/02/20/computer-algorithms-bubble-sort/feed/" rel="self" type="application/rss+xml" />
	<link>/2012/02/20/computer-algorithms-bubble-sort/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: Siyuan</title>
		<link>/2012/02/20/computer-algorithms-bubble-sort/comment-page-1/#comment-19241</link>
		<dc:creator><![CDATA[Siyuan]]></dc:creator>
		<pubDate>Thu, 29 Aug 2013 07:51:12 +0000</pubDate>
		<guid isPermaLink="false">/?p=2729#comment-19241</guid>
		<description><![CDATA[Your implementation in the best case is still O(n^2), although no swaps is needed.
function bubble_sort($arr)
{
	$length = count($arr);
        
	for ($i = 0; $i  $i; $j--) {
			if ($arr[$j] &#060; $arr[$j-1]) {
				$t = $arr[$j];
				$arr[$j] = $arr[$j-1];
				$arr[$j-1] = $t;
                                $swapped = true;
			}
		}
                if ($swapped == false)
                       break;
	}
 
	return $arr;
}]]></description>
		<content:encoded><![CDATA[<p>Your implementation in the best case is still O(n^2), although no swaps is needed.<br />
function bubble_sort($arr)<br />
{<br />
	$length = count($arr);</p>
<p>	for ($i = 0; $i  $i; $j&#8211;) {<br />
			if ($arr[$j] &lt; $arr[$j-1]) {<br />
				$t = $arr[$j];<br />
				$arr[$j] = $arr[$j-1];<br />
				$arr[$j-1] = $t;<br />
                                $swapped = true;<br />
			}<br />
		}<br />
                if ($swapped == false)<br />
                       break;<br />
	}</p>
<p>	return $arr;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jbabe</title>
		<link>/2012/02/20/computer-algorithms-bubble-sort/comment-page-1/#comment-18547</link>
		<dc:creator><![CDATA[jbabe]]></dc:creator>
		<pubDate>Mon, 11 Mar 2013 11:21:08 +0000</pubDate>
		<guid isPermaLink="false">/?p=2729#comment-18547</guid>
		<description><![CDATA[tnx sa info na &#039;to. it helps me sa&#039;king project]]></description>
		<content:encoded><![CDATA[<p>tnx sa info na &#8216;to. it helps me sa&#8217;king project</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arjun</title>
		<link>/2012/02/20/computer-algorithms-bubble-sort/comment-page-1/#comment-15973</link>
		<dc:creator><![CDATA[arjun]]></dc:creator>
		<pubDate>Mon, 11 Jun 2012 06:31:42 +0000</pubDate>
		<guid isPermaLink="false">/?p=2729#comment-15973</guid>
		<description><![CDATA[nice , explanation !!!
but provide a general algorithms to understand better &#062;&#062;&#062;]]></description>
		<content:encoded><![CDATA[<p>nice , explanation !!!<br />
but provide a general algorithms to understand better &gt;&gt;&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pablo</title>
		<link>/2012/02/20/computer-algorithms-bubble-sort/comment-page-1/#comment-15179</link>
		<dc:creator><![CDATA[Pablo]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 21:05:52 +0000</pubDate>
		<guid isPermaLink="false">/?p=2729#comment-15179</guid>
		<description><![CDATA[The reason # 2 is false. In all programming languages I know (including JavaScript) the built-in sort function provides a way to pass in a custom function to decide if an item is smaller than other without change the underlying sorting algorithm.]]></description>
		<content:encoded><![CDATA[<p>The reason # 2 is false. In all programming languages I know (including JavaScript) the built-in sort function provides a way to pass in a custom function to decide if an item is smaller than other without change the underlying sorting algorithm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2012/02/20/computer-algorithms-bubble-sort/comment-page-1/#comment-15146</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Wed, 22 Feb 2012 15:27:41 +0000</pubDate>
		<guid isPermaLink="false">/?p=2729#comment-15146</guid>
		<description><![CDATA[Thanks, Adele!]]></description>
		<content:encoded><![CDATA[<p>Thanks, Adele!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adele</title>
		<link>/2012/02/20/computer-algorithms-bubble-sort/comment-page-1/#comment-15145</link>
		<dc:creator><![CDATA[adele]]></dc:creator>
		<pubDate>Wed, 22 Feb 2012 15:26:35 +0000</pubDate>
		<guid isPermaLink="false">/?p=2729#comment-15145</guid>
		<description><![CDATA[Great article, Stoimen! As always!]]></description>
		<content:encoded><![CDATA[<p>Great article, Stoimen! As always!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
