<?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: Programming Brain Teaser</title>
	<atom:link href="http://blog.enrii.com/2008/07/09/programming-brain-teaser/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.enrii.com/2008/07/09/programming-brain-teaser/</link>
	<description>A passionate programmer's findings in the world of internet.</description>
	<lastBuildDate>Sat, 14 Nov 2009 19:52:52 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Terry Riegel</title>
		<link>http://blog.enrii.com/2008/07/09/programming-brain-teaser/comment-page-1/#comment-76417</link>
		<dc:creator>Terry Riegel</dc:creator>
		<pubDate>Mon, 10 Nov 2008 21:50:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enrii.com/?p=376#comment-76417</guid>
		<description>Your code leaves extraneous [strong][/strong] tags when there are only 2 letters. It would leave something like

abcc[strong][/strong]dee[strong]eee[/strong]...

I used square brackets as I am not sure the regular brackets would make it into the comment</description>
		<content:encoded><![CDATA[<p>Your code leaves extraneous [strong][/strong] tags when there are only 2 letters. It would leave something like</p>
<p>abcc[strong][/strong]dee[strong]eee[/strong]&#8230;</p>
<p>I used square brackets as I am not sure the regular brackets would make it into the comment</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EngLee</title>
		<link>http://blog.enrii.com/2008/07/09/programming-brain-teaser/comment-page-1/#comment-72835</link>
		<dc:creator>EngLee</dc:creator>
		<pubDate>Wed, 09 Jul 2008 02:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enrii.com/?p=376#comment-72835</guid>
		<description>I agree with you. But, hey, you were only optimizing my code. Your are like simplifying mathematics formulas.

I&#039;m sure you will get something different if you were to work from the question.

Anyway, it&#039;s always better to optimize codings, which I didn&#039;t do. I only tried to make it work.</description>
		<content:encoded><![CDATA[<p>I agree with you. But, hey, you were only optimizing my code. Your are like simplifying mathematics formulas.</p>
<p>I&#8217;m sure you will get something different if you were to work from the question.</p>
<p>Anyway, it&#8217;s always better to optimize codings, which I didn&#8217;t do. I only tried to make it work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gbyeow</title>
		<link>http://blog.enrii.com/2008/07/09/programming-brain-teaser/comment-page-1/#comment-72834</link>
		<dc:creator>gbyeow</dc:creator>
		<pubDate>Wed, 09 Jul 2008 02:37:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enrii.com/?p=376#comment-72834</guid>
		<description>Well, I would save myself some if statements and comparisons. Does the same thing. It doesn&#039;t make the code any more concise or easier to read:

&lt;pre&gt;foreach ($arr as $item) {
	if ($prev == $item) {
		$count ++;
		if ($count == 2) echo &#039;&lt;strong&gt;&#039;;
	} else {
		if ($count &gt;= 2) echo &#039;&lt;/strong&gt;&#039;;
		$count = 0;
	}
	echo $item;
	$prev = $item;
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Well, I would save myself some if statements and comparisons. Does the same thing. It doesn&#8217;t make the code any more concise or easier to read:</p>
<pre>foreach ($arr as $item) {
	if ($prev == $item) {
		$count ++;
		if ($count == 2) echo '&lt;strong&gt;';
	} else {
		if ($count &gt;= 2) echo '&lt;/strong&gt;';
		$count = 0;
	}
	echo $item;
	$prev = $item;
}</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
