Skip to content

Luis-is-coder/Project-Euler-Problems

Repository files navigation

ProjectEulerChallenges

Small collection of JavaScript solutions for the first 10 Project Euler problems. Each problem is implemented as a separate, standalone script that prints example outputs to the console.

Prerequisites

  • Install Node.js (v12+ recommended).

Run

From the project root run any problem script with Node.js. For example:

node problem1.js
node problem10.js

Files

  • problem1.js: Multiples of 3 or 5 — sum multiples below a given limit.
  • problem2.js: Even Fibonacci Numbers — sum even Fibonacci numbers up to a limit.
  • problem3.js: Largest Prime Factor — find the largest prime factor of a number.
  • problem4.js: Largest Palindrome Product — largest palindromic product from two n-digit numbers.
  • problem5.js: Smallest Multiple — least common multiple of numbers 1..n using GCD/LCM.
  • problem6.js: Sum Square Difference — difference between square of sum and sum of squares.
  • problem7.js: 10001st Prime — find the nth prime using a sieve.
  • problem8.js: Largest Product in a Series — greatest product of n adjacent digits.
  • problem9.js: Special Pythagorean Triplet — find the product abc where a+b+c = n.
  • problem10.js: (Project Euler Problem 10) — sum of primes below a given limit.

Notes

  • Each script is standalone and prints example outputs with console.log.
  • These are intended as learning exercises and are not optimized for large-scale benchmarking.

Contributing

Feel free to open issues or submit improvements ( performance, tests, or more examples ).

Project-Euler-Problems

These files are JavaScript solutions to the Project Euler problems, each implemented in a separate file.

I intend to add solutions of up to 100 Euler Problems in this repo.

About

These files are JavaScript solutions to the Project Euler problems, each implemented in a separate file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors