Majestic Sea Creature

Technical Ramblings from Gregory Brown

Solution to Project Euler #67

Project Euler is an awesome way for math nerds to kill time. I like it because it’s something I can do with my girlfriend, since we both enjoy maths. Sometime we compete, other times we work together.

This solution is for #67, which is a harder variant of #18

On this one, the idea came to me right away, but she helped catch some bugs in my algorithm. I reverse the tree because it fits my mental model. Destructive functional programming FTW!

(Seriously, I could have written this cleaner, but, meh)

Written by Gregory Brown on 2008.10.15 at 00:50 | Responses


blog.majesticseacreature.com : Home | Archives | Feed