Skip to content

david15tonon/project-euler-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

project-euler-js

Solutions to Project Euler problems (1 to 100) in JavaScript.

Introduction

This repository contains solutions to the first 100 problems from Project Euler by FreeCodeCamp, implemented in JavaScript. Each problem is solved using an efficient algorithm and well-commented code to explain the approach used. You can find a complete list of problems and news problem on the original page of the Project Euler - click me

Table of Contents

  1. Project Euler Overview
  2. Solution Structure
  3. How to Run the Solutions
  4. Contributing
  5. License

Project Euler Overview

Project Euler is a collection of challenging mathematical/computer programming problems. The goal is to develop efficient algorithms to solve the problems in a limited time.

In this repository, I've solved problems 1 through 100. These solutions aim to be both accurate and efficient. Some problems require mathematical insights, while others focus on algorithmic complexity and optimization.

Solution Structure

Each problem has its own JavaScript file. The solutions are numbered according to the problem number (e.g., problem_1.js, problem_2.js, etc.). Inside each file, the solution for that specific problem is provided with a brief explanation of the approach used to solve it.

Example:

  • problem_1.js: Solution for Problem 1 - Multiples of 3 and 5
  • problem_2.js: Solution for Problem 2 - Even Fibonacci numbers
  • problem_3.js: Solution for Problem 3 - Largest prime factor
  • ...

How to Run the Solutions

To run the solutions locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/david15tonon/project-euler-js.git
  2. Navigate to the project directory:

    cd project-euler-js
  3. Run a solution (example with Problem 1): You can run a specific problem file using Node.js. For example, to run Problem 1:

    node problem_1.js
  4. Install Node.js if needed: If you don't have Node.js installed, you can download it from here.

Contributing

Contributions to this project are welcome! If you have a more efficient or improved solution for any of the problems, feel free to fork the repository, make your changes, and create a pull request.

Steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature-name).
  3. Implement your solution or improvements.
  4. Test the solution locally.
  5. Commit your changes (git commit -m 'Add solution for problem X').
  6. Push to the branch (git push origin feature/your-feature-name).
  7. Open a pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Additional Notes

  • Some solutions might take a while to run, depending on the problem's complexity. I encourage optimizing algorithms where necessary.
  • Feel free to reach out if you have any questions or suggestions regarding the solutions!

About

Solution to problem from project euler by 1 to 100

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published