Project Euler – Problem Solving Programs!

So, a few months ago, I stumbled across/was linked to a rather interesting site called Project Euler.  It’s a rather simple idea (that you can go read for yourself), in which they present a whole bunch of problems for you to solve by writing a program.

Looking at the first couple of problems, it seems that they can all be brute-forced, but there are clever tricks that you can use to solve them quickly or more efficiently.

I’ve been employed as a developer for a number of years now, and one of the things I worry about is plateauing.  You know, getting lazy such that I still produce code, and it might even be good code, but I’m not really getting any better as a developer.  I want to keep pushing myself, and think this would be good for that.

You can do it in any language, because you are usually giving single numerical answers.  You could work directly in Assembly if you wanted to torture yourself, or work in Python, C#, Java, whatever.  I will be working in C++, because that is my language of choice.

I know I have other friends who are into software development, so if any of you guys think this is cool, you should try it, too!  I want to at least get the first couple done this weekend, and then read the forum posts about more clever solutions.  I might even post blog posts now and again with solutions, though I can promise to make them easy to ignore for all my writer followers.

Which, yes, I’m going to do NaNo, and there will be a post about it at some point in the future.

But yes!  You guys should consider signing up and doing it, and if so, you can add me at the site to track my progress.  My username there is the same as everywhere, cosmam.

This entry was posted in Programming. Bookmark the permalink.

3 Responses to Project Euler – Problem Solving Programs!

  1. Sushi says:

    I’ve been doing these problems on and off for awhile and have solved 20 so far. Granted, my math background gave me the tools to solve several of them with just, well, math instead of code. Not even brute forcing so much as knowing the math behind the problem. Still, it’s a great project and I’ve been meaning to get back into solving more of them. Yay code! And yay writing!

    • cosmato says:

      Yeah, some of them I have been able to work out with pure math (though I haven\’t checked my solutions yet), though I think some are designed for you to find the most efficient algorithm, at least for generic inputs (I always think in terms of generic inputs – it\’s the programmer in me). I haven\’t written it yet, so no spoilers, but I think the largest prime factor problem requires prime factorization, which is very algorithmic (at least that\’s how I\’m solving it to start).

      Have you signed up for an account there?

Leave a Reply

Your email address will not be published. Required fields are marked *