Mar
4
2010
Linked Lists, Double Linked Lists, Arrays, Queues, Stacks… the data structures go on and on, but don’t they all do pretty much the same thing? If you’re like me you probably don’t worry about which you use most the time. Just use whatever is convenient at the time, in C-like languages this will usually be an array, in Functional Languages a List (I believe they use linked lists by default).
Usually the defaults are fine, I mean how much difference could it really make? I didn’t think it would be too much, maybe a couple seconds until my recent experience with Project Euler 78.
Continue reading
no comments | tags: Euler, haskell, performance | posted in Articles, Code, Euler, Full Program
Jun
14
2009
The problem is to find the sum of all the primes below 2 million.
Continue reading
2 comments | tags: Euler, Problem ten, projecteuler.net | posted in Euler
May
28
2009
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91
99.
Find the largest palindrome made from the product of two 3-digit numbers.
Continue reading
1 comment | tags: Euler, projecteuler.net | posted in Euler
May
28
2009
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?
Continue reading
no comments | tags: Euler, projecteuler.net | posted in Euler
May
27
2009
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …
Find the sum of all the even-valued terms in the sequence which do not exceed four million.
Continue reading
no comments | tags: Euler, projecteuler.net | posted in Euler
May
27
2009
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
Continue reading
no comments | tags: Euler, projecteuler.net | posted in Euler