Entries from 2007-04-01 to 1 month

ColdeGolf - Tower of Hanoi

Size: 262 (v4) submitted on 4/14/2007 def f(d)(0..2).find{|i|$a[i]&&$a[i][d.to_s]}end def m d,i,j k=(0..2).find{|k|k!=i&&k!=j} m(d-1,i,k)if d>1 puts"#{d} to #{"ABC"[j,1]}" m(d-1,k,j)if d>1 end $a=[];n=0 ($a<

Rinda Primer

[1] Launch a Rinda TupleSpace require 'rinda/tuplespace' DRb.start_service 'druby://:12345', Rinda::TupleSpace.new p DRb.uri DRb.thread.join Output provides URI of which machine/port the TupleSpace communicates with.[2] Start a server - in…

GLAT Google Lab Aptitude Test

GLAT Question 17: "Consider a function which, for a given whole number n, returns the number of ones required when writing out all numbers between 0 and n. For example, f(13)=6. Notice that f(1)=1. What is the next largest n such that f(n)…

'Perplexing Puzzlers' for April Fool's Day

NPR Weekend Edition Sunday, April 1, 2007 Puzzle master Will Shortz quizzes:Take the names of two U.S. States, mix them all together, then rearrange the letters to form the names of two other U.S. States. What states are these? A Ruby solu…