Skip to content

My Python solutions for the Project Euler (with hackerrank version)

Notifications You must be signed in to change notification settings

kan-fu/Project-Euler-Solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project Euler Solution

This is my collection of solutions for the Project Euler in python, with modifications to account for Hackerrank ProjectEuler+ version.

Personal Thoughts on Project Euler

While there are a lot of platforms for solving coding problems on the internet (like Leetcode, Hackerrank, ...), Project Euler must be one of the most unique ones. Leetcode can help you ace the technical interviews, but problems on Project Euler won't get asked in the interview, thus making it more pure intellectually and less utilitarian practically.

For me, Project Euler is like a bridge between the programming world and the mathematical world. Some people solve problems straightforwardly by brute force (even one line in python), while others use paper-and-pencil style solutions. I prefer a balance between these two. Most problems will introduce some new mathematical insights and concepts (mainly in number theory) that can greatly optimize the naive solution, which usually lies in the discussion forum. These are my main purpose and pleasure of solving the problems in Project Euler.

Indeed Project Euler is not as famous and popular as other online judge platforms like Leetcode (I can't help but compare these two websites, and Project Euler is not a traditional online judge after all). Besides all the commercial and non-commercial reasons (like different target audiences, different benefits, ad promotions, social needs, ...), I think one key reason for Leetcode's success is the open access to the discussion forum. Many great coders on Leetcode share their solutions and thoughts in the discussion that inspires thousands of other coders, which in return becomes valuable assets to Leetcode itself (Some competitors of Leetcode have a much less active community in their discussion forums). Number of problems solved is just a number because their ranking system is based on contests. Leetcode would not become today's Leetcode if the only way to access their solutions is through subscription. This is the spirit of open source knowledge and is also in line with their business logic.

Project Euler was started in 2006 while Leetcode was founded in 2015. The elder brother Project Euler adopted another approach that their forum can only be accessible to those who have solved the problems. They value "process is (maybe way) more important than outcome" philosophy, and discourage the sharing of the solutions (OK for the first 100 problems according to the about section). I myself agree that it is pointless to copy and paste 700+ answers only for the badge and self vanity, which won't get anyone anywhere in the real world. But there is again a balance between solutions that are easily accessible and problems that will never be solved in their lifetime. Project Euler is not Leetcode, and it is perfectly fine to keep everything simple and cool.

That is why I started this repo, to record my progress, and to help those who got stuck in the journey of Projcet Euler. Most times when I solve a problem or cannot solve a problem but use the existing answer, I study the posts in the discussion forum carefully to see if I miss some key concepts. Credits are given to the mathematical lovers from whom I borrowed great ideas.

About

My Python solutions for the Project Euler (with hackerrank version)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages