Ian Dorian Macleod
Q: What is Project Euler?
A: It's a great exercise in thinking
For me, Project Euler provides a good challenge and a motivating way to learn and practice concepts in number theory, math, and programming. The greatest part about Project Euler is that the questions themselves contain concepts that are relevant in a wide variety of external applications, and the very act of practicing the problems helps me sharpen my coding skills. Also, (arguably more importantly), the questions push me to learn more about the math that underpins most solutions. I chose to write up explanations for a selection of the questions I've solved so that others can also learn from the questions and maybe get a hint if they're stuck. I'm definitely not the first person to write up explanations for these questions: much of the credit for this idea goes to Stephan Brumme.
My Approach
Most (but not all!) of the questions in Project Euler are written so that an initial greedy approach will be futile due to exorbitant time costs for calculations (this construction is often achieved using extremely large values for test cases). In this way, the questions push you to think about more creative answers to problems that you could probably solve trivially for small values of $n$. I often try to solve the problems by thinking of a greedy solution, abandoning it, and then trying to optimize or redesign something more creative that will end up being faster. Also, I use a precompiled header file in C++ for all of my solutions called <stdc++&rt;. This header file is custom in the sense that you probably don't have it on your computer by default, but it is common in the sense that precompiled catch-all headers pervade lots of C++ coding, especially competitive coding settings. It's relatively easy to set up; I've included a description on how to set it up here.
A few notes on the website
Writing up the solutions for the problems is somewhat time intensive, and designing a nice interface to display said solutions is equally time intensive! For that reason, there are likely to be errors / typos in my explanations. If you happen to spot something that doesn't look quite right, please let me know by emailing me at idm2114@columbia.edu.
Problems I've solved
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40