Thursday, February 8, 2007

Project Euler

I came across Project Euler last night and decided it would be a good diversion while I was trying to get my mind around how best to represent the data structures I need for my Doo-Sabin project. I solved problems 1, 2, 6 and 9 last night and got started on 14. Some random hints/tips on the problems:

1 - trivial to solve using a list comprehension
2 - remember Fibonacci numbers get big fast
6 - sum [1 .. n] = n(n+1)/2
9 - solved using the constraint features of the Oz language

No comments: