Kevin Greer's Stuff
[ start | index | login ]
start > comment-start > 2005-12-25 > 1-2

1-2 commented start/2005-12-25/1

Created by Christer. Last edited by Christer, 2 years and 281 days ago. Viewed 117 times. #2
[diff] [history] [edit] [rdf]
labels
attachments
Kevin,

really good brute force solver, you've made!

Are you sure

return solve(a, b, c+1, 0) if d==3 return solve(a, b+1, 0, d) if c==3 return solve(a+1, 0, c, d) if b==3

shouldn't be

return solve(a, b, c+1, 0) if d==3 return solve(a, b+1, 0, 0) if c==3 return solve(a+1, 0, 0, 0) if b==3

?

(I rewrote it in Ruby)

regards Christer

6 comments (by Christer, paul, kgr) | post comment
peerbox.com | Copyright 2005-2006 Kevin G. R. Greer