<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tsukasa's ramblings &#187; Programming</title>
	<atom:link href="http://blag.tsukasa.net.au/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blag.tsukasa.net.au</link>
	<description>Tech ramblings of Greg Darke, a University of Sydney student</description>
	<lastBuildDate>Fri, 28 May 2010 12:40:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>NCSS Python Golf</title>
		<link>http://blag.tsukasa.net.au/2010/01/03/ncss-python-golf/</link>
		<comments>http://blag.tsukasa.net.au/2010/01/03/ncss-python-golf/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 13:49:52 +0000</pubDate>
		<dc:creator>Tsukasa</dc:creator>
				<category><![CDATA[golf]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[NCSS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[python golf]]></category>

		<guid isPermaLink="false">http://blag.tsukasa.net.au/?p=159</guid>
		<description><![CDATA[It is time again for me to run a Python Golf challenge&#8230; The aim? To write a python program that solves a problem in the least number of bytes (of source code).
The first of a few problems is:
Given a list of words on stdin (one per line), find the words that have the largest number [...]]]></description>
			<content:encoded><![CDATA[<p>It is time again for me to run a Python Golf challenge&#8230; The aim? To write a python program that solves a problem in the least number of bytes (of source code).</p>
<p>The first of a few problems is:</p>
<p>Given a list of words on stdin (one per line), find the words that have the largest number of <a href="http://en.wikipedia.org/wiki/Anagram">anagrams</a> in that list.</p>
<p>Print all of the words that have the meet the criteria of having the largest number anagrams (One per line, in alphabetical order).</p>
<p>This competition has now finished. The winner was Nick Cooper at 103 bytes, with the following awesome solution:</p>
<pre class="brush: python;">
import sys
s=sorted
o=s(sys.stdin)
r=map(s,o)
d=map(r.count,r)
for e,t in zip(o,d):print e*(max(d)==t),
</pre>
<p><!-- more --></p>
<p>Input:<br />
<code>caret<br />
crate<br />
react<br />
trace<br />
ester<br />
reset<br />
steer<br />
terse<br />
organ<br />
groan</code></p>
<p>Output:<br />
<code>caret<br />
crate<br />
ester<br />
react<br />
reset<br />
steer<br />
terse<br />
trace</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blag.tsukasa.net.au/2010/01/03/ncss-python-golf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
