Google Treasure Hunt primes question

In the comments to my post on the Google treasure hunt Andre asked me to put up my solution for the fourth problem. The problems were personalised and here is mine: Find the smallest number that can be expressed as the sum of 3 consecutive prime numbers, the sum of 29 consecutive prime numbers, the …

Continue reading ‘Google Treasure Hunt primes question’ »

Share

Google Treasure Hunt, check!

I personally found the first one to be the trickiest, quite a bit of thinking with a colleague before we saw Pascal’s triangle in the problem. I was a bit worried that things would get trickier from there on. It surely didn’t. The second, summing certain lines taken from files matching certain glob patterns, was …

Continue reading ‘Google Treasure Hunt, check!’ »

Share

Silly realisation

I bet a lot of people would consider this to be fairly obvious, but today, while solving the fourth of Google’s Treasure Hunt problems I realised just how similar in essence laziness+infinate lists in Haskell is to generators in Python. It’s just much easier to work with the former

Share