Project Euler featured image
2020

Project Euler

JavaScript
Python
Math
Competitive Programming
Interview Questions

In 2020, one of my friends at work — who I now consider to be my first mentor — showed me a site that I was very intrigued by. It's called Project Euler. The site is relatively simple and consists of a series of math questions that typically require some sort of programming to solve. At the time of writing this, there are over 800 problems on the site, ranging across many difficulties.

When I first started working on Project Euler, I decided to use JavaScript as my programming language of choice to solve the problems. And over the next year or so, I would spend time on a daily basis thinking about the problems and writing code aimed to solve them in the most optimal way. At the same time, I became interested in learning Python so I challenged myself to port all of the existing JavaScript solutions to Python. I became so fond of writing Python that eventually I would reach for it first and then port the solution back to JS!

During this period, I also learned the value of writing unit tests because I would typically take a functional approach to my solutions with inputs that had expected outputs. The unit tests also had the added benefit of essentially benchmarking my code and giving me a sense of how optimal my solutions were. As I'd attempt to refactor my solutions to arrive at the answer in the most simple or optimal approach, it also taught me some of the ideas surrounding time and space complexity and how to describe my code in those terms.

I set a goal for myself to solve the first 100 problems, and I've nearly achieved it by solving over 90 of them. It's been a while since I've worked on these problems because my focus has shifted to other projects over the years, but I still have sense of nostalgia for those times and will hopefully return to this project in the future.

If you're interested in reading more about Project Euler and seeing some of my solutions check them out on GitHub.

Stats

90+

Problems solved

2

Languages used

Related Projects

appear-on-scroll

Show elements as they enter the browser viewport on scroll. A reusable JavaScript package with customizable animation options.

davemaynard.dev

This portfolio website for displaying my past work and experimenting with new development technologies.