I have done Project Euler very sporadically since high school. To date I've only done problems 1-54. Despite this, I think the website was a big contributor to my love of programming. I found it before knowing about leetcode and I think it prepared me well. I think I owe Project Euler a decent %-age of my eventual entry into Software Engineering as a field.
This website was a part of my education as a computer scientist and seeing it here again I'm curious for the full story of how this site was made. Who made it, what do they do now, is it part of a broader project they have?
Like many others here, Project Euler was foundational in my education and growth as a programmer.
Leonhard Euler himself is an incredible figure and arguably the most prodigious contributor to mathematics throughout history. So much so that people started naming things discovered by him after the next person to have proved them.
Maybe Gauß takes that trophy. To me it felt in mathematics lectures, that Gauß had his hand in everything. Euler might have had that too, but I am not that aware maybe.
Glanced at the exercises. It appears that two of them have numbers arranged in a triangle and ask for a longest path.
Hmm. Given such a triangle, let m be the largest number in the triangle. For each x in the triangle, replace it with m - x. For the resulting triangle, solve it to give the shortest path using one of the well known network shortest path algorithms.
The "well known" path algorithms in this case are overkill; the graph is a tree. And Dijkstra is not really designed to handle negative edge weights (although it would probably function correctly in this instance).
I discovered project euler as a novice programmer in high school around 15 years ago. I loved how solving a problem unlocks a secret forum only available to other solvers. I would spend hours reading through everyone's prior solutions and trying to understand them. One guy had tagged his profile as "haskell" but would always provide his solutions in ruby which threw child-me for quite a loop (I actually thought ruby and haskell were the same language for some time)!
The most fun on this site is solving a problem and then having your mind blown by solutions in Apl/j/k and trying to guess what they mean without knowing anything about those languages
I've solved about a hundred PE problems in Livecode, maybe 40 in Python, and about 20 in J. I highly recommend giving it a try in a language you don't know, it's fun! Especially with something as obscure as J.
I attribute project euler for instilling the playful enjoyment of writing programs in college while I was studying electrical and computer engineering. I owe my career to it!
I remember visiting Project Euler back in 2013/14 or so. Was really my first introduction to programming exercises as youngin. Probably did fifteen or so of them before ADHD kicked in though. A small gem on the web.
I ranked on that once! I was like the 23rd person to do one of the new problems one time. Just about as low as you can rank. It was a fun puzzle but you had to be awake at a funky time to do it.
i was a euler fanatic some years ago reaching problems in the 500s albeit, skipping problems along the way. at that point, too many problems required a deeper math background than i possessed so i abandoned it. what amazed me was that others composed solutions that solved problems in mere milliseconds that brute force approaches would still be running when the universe cooled to absolute zero.
I love running euler problems when trying to learn the basics of a new programming language. I have a small collection of programs in like 10 different languages that I keep around as a reference for things because I always try to use language-specific features to solve the problems, and then I reference them as examples.
These are both a lot more fun, and a lot more educational than leetcode problems. Strongly recommend for anyone looking for practice problems when learning a new language or whatever.
Ha! I did a lot of these around 2007-2008. I solved the first 100 or so ones. Solving these were more fun than any other programming problems site I've seen. I quit it when I realized I was spending 4+ hours per problem - I couldn't justify the time.
Beyond a certain point, most required some knowledge of elementary number theory.
Same for me, the first 100 are doable, after that they take more and more time and require deeper mathematical knowledge. Which is nice as well, but at some point I started to wonder if it wouldn't be better if I spent all that time on learning some more practical knowledge.
I remember it vaguely but there used to be a badge awarded for being among the first 100 people to solve the problem. I was obsessed with getting that badge to the point that I spent obscene amount of time solving the-then recently released problem even when the following day was my final exams. I did manage to get that badge though. This was circa 2013. Fun times!
One of my best memories was in undergrad there was one semester in 2013 where half a dozen of my CS classmates and I competed to try and solve the most Project Euler problems. We had a leaderboard and everything.
I saw first hand how much faster my friend’s Java solutions were than my Python solutions.
I did a lot of these when I was around 15-16 and it solidified for me my interest in CS but in general abstract thinking and problem solving. Great site.
71 comments
[ 5.0 ms ] story [ 75.5 ms ] threadThere is only very basic info here: https://en.wikipedia.org/wiki/Project_Euler
Leonhard Euler himself is an incredible figure and arguably the most prodigious contributor to mathematics throughout history. So much so that people started naming things discovered by him after the next person to have proved them.
https://en.wikipedia.org/wiki/List_of_topics_named_after_Leo...
Hmm. Given such a triangle, let m be the largest number in the triangle. For each x in the triangle, replace it with m - x. For the resulting triangle, solve it to give the shortest path using one of the well known network shortest path algorithms.
Makes me miss Google CodeJam though.
I also love looking back at my old PE code and having absolutely no idea what it doing. No comments, no docs, no notes. From a different era.
Beyond a certain point, most required some knowledge of elementary number theory.
I saw first hand how much faster my friend’s Java solutions were than my Python solutions.
Good times.