HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Haskell Quiz/Count and Say

< Haskell Quiz

Categories: Haskell Quiz


Ruby Quiz #138: This quiz involved counting the number of letters in a particular string, and generating a new string that would be the result of saying the results of the count. For instance, if we start with "HASKELL RULES", we get the sequence:

 HASKELL RULES
 ONE A TWO E ONE H ONE K THREE L ONE R TWO S ONE U
 ONE A EIGHT E TWO H ONE K ONE L FIVE N SEVEN O TWO R ONE S THREE T ONE U TWO W

and so on. The object of the quiz is to determine, given an initial string, whether the sequence ever goes into a loop, and if so, how long the cycle length is.

1 The Problem

2 Solutions

Retrieved from "http://haskell.org/haskellwiki/Haskell_Quiz/Count_and_Say"

This page has been accessed 537 times. This page was last modified 20:28, 14 September 2007. Recent content is available under a simple permissive license.