<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>swaits.com: Ruby Quiz #60 - Test Cases</title>
    <link>http://swaits.com/articles/2005/12/31/ruby-quiz-60-test-cases</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>A Blog by Stephen Waits</description>
    <item>
      <title>Ruby Quiz #60 - Test Cases</title>
      <description>&lt;p&gt;I think about all I&amp;#8217;m going to be able to actually accomplish on &lt;a href="http://www.rubyquiz.com/quiz60.html"&gt;this quiz&lt;/a&gt; is to generate a few test cases via brute force or stochastic search.  That said, &lt;a href="/files/rq60.rb"&gt;here they are&lt;/a&gt; &amp;#8211; please let me know if you find shorter solutions so that I may update my own cases.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update:&lt;/em&gt; Christer Nilsson pointed out a better solution for &lt;code&gt;300 -&amp;gt; 1&lt;/code&gt;.  I&amp;#8217;ve corrected it in my test suite.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update:&lt;/em&gt; Peter Burns has updated my test code, fixing several cases, and making it a bit more data-centric.  Check it out &lt;a href="http://rafb.net/paste/results/qwhnUg32.nln.html"&gt;here&lt;/a&gt;.  As a side note, my original code was output by a &lt;code&gt;C++&lt;/code&gt; program.  &lt;em&gt;Blush.&lt;/em&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 31 Dec 2005 10:57:31 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:81cf1850-0982-4200-be27-65ea8bcbaea8</guid>
      <author>steve@waits.net (Stephen Waits)</author>
      <link>http://swaits.com/articles/2005/12/31/ruby-quiz-60-test-cases</link>
      <category>ruby</category>
      <category>programming</category>
      <trackback:ping>http://swaits.com/articles/trackback/44</trackback:ping>
    </item>
  </channel>
</rss>
