Saturday, 10 November 2012

Project Euler

Over the past couple of years I keep on coming back to Project Euler, it's nice when you just want a quick challenge, or to try your maths skills. It's highlighted how rusty some of my concepts were, and I've learnt a whole load of new ones along the way. I really like the way that the example problem given is quite quick to determine using brute force, but the desired answer always needs a more considered approach.

I've just completed problem 26, to determine value of d (1/d) where d < 1,000 and resulted in the largest recurring cycle of the decimal fraction. My first (working) solution completed the task in 2.8 seconds, well within the proposed ideal time frame. What's really helpful is then reading through the forum of previous solutions you can pick up some ideas that start to bring the entire process down to under a second!

You can see my progress in the graphic on the right hand side, or can check my progress on the project euler site.

No comments:

Post a Comment