People often ask me "how can I get into competitive programming?"
My answer has always been simple: practice as many algorithm and data structures problems as you can.
But today, I have something more concrete for you. A challenge that will expand your computer science and math knowledge – all while giving you a ton of programming practice.
It's called #ProjectEuler100. And a lot of people have already publicly accepted the challenge.
The challenge is named after Leonhard Euler, one of the most prolific mathematicians in history.
It represents learning on hard mode. Finishing this challenge will demand creativity and problem solving skills you didn't even know you had. It will turn you into an incredibly resourceful developer. It will give you the confidence to tackle the most ambitious projects.
In short, the #ProjectEuler100 challenge will be a crucible where your Super Saiyan self is forged, ready to unleash your latent engineering genius on the world.
What is Project Euler?
Project Euler is a website created back in 2001. It hosts a collection of around 600 different algorithm problems that get progressively harder, to the point where even people with math PhD's still struggle with them.
This said, the first 100 problems are totally do-able by a new developer. Thousands of people have completed the first 100 Project Euler problems over the years.
It's just brutally hard. Like... Dark Souls hard.
I love the Project Euler problems. I used them extensively when I was first learning to code. I love these so much that we've added these Project Euler problems to freeCodeCamp's Interview Preparation section.
These will really wrack your brain. But they will be rewarding. They are hard, but fair. And if you're willing to swallow your pride and go down a few Wikipedia rabbit holes, you can solve them, too.
So what do you think. Are you up for solving the first 100 Project Euler problems? Here are the rules.
The Rules of the #ProjectEuler100 Challenge
I've boiled everything down to these 6 simple rules all participants must follow.
- Tweet out a photo of yourself giving a thumbs-up and announcing that you are committing to the #ProjectEuler100 challenge.
- Create a GitHub repository.
- Each time you complete a challenge, add your solution to your GitHub repository and tweet a link to it using the #ProjectEuler100 hashtag.
- Then scroll through the #ProjectEuler100 hashtag and give supportive feedback on at least 2 tweets from other developers.
- Move on to the next Project Euler challenge. You can't skip ahead. You have to complete all 100 problems in order. But you can use any programming language you want to solve these.
- Once you've finished all 100 of them, tweet out a celebration photo of yourself with your laptop open to your GitHub repo.
Where do I do my coding?
You can use the 20-year-old Project Euler website itself.
Or you can use the freeCodeCamp.org version - which lets you code right in your browser, and has built-in tests.
Or if you're feeling spicy, you can build your own website for solving these challenges. (All of the Project Euler problems are Creative Commons-licensed and are free for non-commercial use.)
Why do I need to put my solutions on GitHub?
Putting your solutions into GitHub (Or GitLab or BitBucket) accomplishes several things:
- It gives you a nice public record of your progress that you can share with other people.
- It will make your GitHub profile look super active for any employers / clients looking to hire you.
- It gives you something you can show to your grandkids.
Can I look at other people's solutions?
You can look at other people's solutions for problems that you yourself have already solved.
Each challenge can be solved in many different ways - some more elegant than others. And you can compliment other people on their approaches.
This said, it's 2020. The reality is that solutions to these problems are already peppered across the web. You may accidentally stumble upon a solution if you're searching for hints.
If you are exposed to the solution of a challenge that you have not yet completed yourself, you absolutely should not use the code you see there. You need to come up with code solutions for each of these problems yourself.
Can I live stream my attempts?
Yes. By all means. As I said, the solutions to these problems are already all over the web. And many of the people who would tune in on Twitch or YouTube won't be doing the challenge - they'll just enjoy watching programming streams in general.
So don't worry about "spoiling" anything during your live streams.
We will be live streaming #ProjectEuler100 attempts on freeCodeCamp's YouTube channel.
This said, if you are creating video guides or articles that people would use as a reference to these problems, I encourage you to include spoiler warnings. People want hints so they can get unstuck - not full solutions.
How fast do I need to solve these?
To quote a great man:
"It does not matter how slowly you go as long as you do not stop." - Leonhard Euler
(OK, that quote is commonly attributed to Confucius. But all kinds of quotes get mis-attributed to Confucius, so I'm misattributing this quote to my boy Euler. ?)
The first few problems are relatively easy. But they rapidly increase with difficulty. By the time you get to the final 20 or 30, you may be spending days to solve a single problem.
So don't make the mistake of saying "I'm going to finish these in 100 days" or something like that. Just keep working on these a little bit every day. You've got an entire community around you to help you make it past the finish line.
The community is here to support you
We are all in this together. We're huddled around the #ProjectEuler100 hashtag on Twitter. This is baked right into the challenge rules. ("Rule #4: Scroll through the #ProjectEuler100 hashtag and give supportive feedback on at least 2 tweets from other developers.")
You will support other developers embarking on this challenge. And they will be there to support you.
I also encourage you to join our #ProjectEuler100 Discord chat room where you can chat about the challenge and get help.
And you can follow our #ProjectEuler100 Twitter bot.
So if you're ready, take the first step. Tweet out a photo of yourself giving a thumbs-up and announcing that you are committing to the #ProjectEuler100 challenge.
You've got this.