Project Euler

Project Euler is a set of mathmatically-oriented open challenges for developers.  I started working my way through these the other day with a bent of using C# and LINQ as much as possible.
http://projecteuler.net

I’ve shared my source on my public GitHub
http://github.com/stephbu/projecteuler

For example: Problem #4 “Find the largest palindrome made from the product of two 3-digit numbers.”
http://projecteuler.net/index.php?section=problems&id=4

Use of LINQ to express the cartesian join between the sets of 3 digit numbers dramatically simplifies the amount of code written.  While the code is somewhat inefficient – I don’t dedupe reflexive pairs of numbers between sets – it is quite elegant.

https://github.com/stephbu/ProjectEuler/blob/0653d45c8e6a489057692410b3d409711b202f1c/ProjectEuler/Problem4.cs

Advertisements

About stephbu

Architect, Cyber-brickie, Father, Cook, Financier, Taxi Service
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s