Want a regular Ruby Quiz? (long)

Perhaps we could take a favorite book, "Programming Pearls" by Jon Bently
and use some of the puzzles contained therein. For example, from page 11:

I'm unfamiliar with this book, but it's looking good so far. Pick a favorite problem or three and submit then to rubyquiz@grayproductions.net when you have a chance.

  "Given a dictionary of English words, find all sets of anagrams. For
instance, "pots", "stop" and "tops" are all anagrams of one another because
each can be formed by permuting the letters of the others."

And its related question:

  "Consider the problem of finding all the anagrams of a given input word.
How could you solve this problem given the word and the dictionary? What
if you could spend some time and space to process the dictionary before
answering the query?"

The Perl Quiz of the Week has done some fun problems along these lines. My favorite was a word ladder problem where you find all the words from say "house" to "shack", varying only a single letter at each step. All words along the way also had to be in the dictionary.

It looks as if the CodeKatas may have also included this one. It seemed to be mentioned on the Wiki, though I didn't see it in the blog.

Word problems are always fun. Hopefully, we'll have some good ones too...

James Edward Gray II

···

On Sep 17, 2004, at 11:39 AM, Mark Probert wrote:

Excellent link. A few questions:

Are you regularly adding more?

Does your mailing list see steady traffic?

I wasn't aware of this resource.

James Edward Gray II

···

On Sep 17, 2004, at 11:53 AM, Dave Thomas wrote:

On Sep 17, 2004, at 11:39, Mark Probert wrote:

Perhaps we could take a favorite book, "Programming Pearls" by Jon Bently
and use some of the puzzles contained therein. For example, from page 11:

Have you had a look at my CodeKata?

  http://pragprog.com/pragdave/Practices/Kata

James Edward Gray II <james@grayproductions.net> writes:

Perhaps we could take a favorite book, "Programming Pearls" by Jon
Bently
and use some of the puzzles contained therein. For example, from page
11:

I'm unfamiliar with this book, but it's looking good so far. Pick a
favorite problem or three and submit then to
rubyquiz@grayproductions.net when you have a chance.

Are you familiar with http://acm.uva.es/problemset/ ?

From the site:

"Here you will find hundreds of problems. They are like the ones used
during programming contests, and are available in HTML and PostScript
formats. You can submit (by web or mail) your C, C++, Pascal or Java
sources, trying to solve any of the problems available in our
database. Please read the docs if you want to know more about the
submission methods and the judge itself."

Write a validator that accepts ruby solutions, and you'll become a
hero overnight. :wink:

···

On Sep 17, 2004, at 11:39 AM, Mark Probert wrote:

  http://pragprog.com/pragdave/Practices/Kata

Are you regularly adding more?

I plan to start again once I get this Ruby book put to bed.

Does your mailing list see steady traffic?

Typically just when a new kata comes out. Then people like to discuss it (although we discourage posting solutions on the list itself)

Cheers

Dave

···

On Sep 17, 2004, at 12:27, James Edward Gray II wrote:

I am now. Thank you for the rich link.

James Edward Gray II

···

On Sep 17, 2004, at 6:29 PM, George Ogata wrote:

Are you familiar with http://acm.uva.es/problemset/ ?