-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sean Carley wrote: > My solution does have one aspect I haven't noticed in everyone's great > submissions so it might be illustrative, if nothing else - I wrote my > implementation test first. Other than that, there isn't too much > novelty in my solution. IMHO there is too much re-computation of nth_row() in this implementation. See for yourself with this patch: - --- pascal.rb 2006-06-26 12:27:51.000000000 -0700 +++ pascal-2.rb 2006-06-26 12:27:43.000000000 -0700 @@ -1,5 +1,6 @@ class Pascal def self.nth_row(n) + puts "computing nth_row for n=#{n}", caller case n when 1 [1] I would use cached results of nth_row to avoid re-calculating previously calculated results. - -- BASIC is to computer programming as QWERTY is to typing. -- Seymour Papert -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFEoDd2mV9O7RYnKMcRAh1cAKChM701IcAIAnFhr5Pqs/Qy6wnRHgCeLBlc uJD+aZn1FFQ9aCAnxITTmTA= =nYrF -----END PGP SIGNATURE-----