From: Christian von Kleist Date: 2007-12-08T06:30:09+09:00 Subject: Re: [QUIZ] Word Loop (#149) On Dec 7, 2007 3:45 PM, Ruby Quiz wrote: > The three rules of Ruby Quiz: > > 1. Please do not post any solutions or spoiler discussion for this quiz until > 48 hours have passed from the time on this message. > > 2. Support Ruby Quiz by submitting ideas as often as you can: > > http://www.rubyquiz.com/ > > 3. Enjoy! > > Suggestion: A [QUIZ] in the subject of emails about the problem helps everyone > on Ruby Talk follow the discussion. Please reply to the original quiz message, > if you can. > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > Here's a fun little challenge from the Educational Computing Organization of > Ontario. > > Given a single word as input try to find a repeated letter inside of it such > that you can loop the text around and reuse that letter. For example: > > $ ruby word_loop.rb Mississippi > i > p > p > Mis > ss > si > > or: > > $ ruby word_loop.rb Markham > Ma > ar > hk > > or: > > $ ruby word_loop.rb yummy > yu > mm > > If a loop cannot be made, your code can just print an error message: > > $ ruby word_loop.rb Dana > No loop. > > I read this quiz on the mailing list in GMail and I didn't get this challenge at first. Then I realized that you need to imagine the examples in a fixed-width font. Just FYI. :)