Prime Factorization - Naive Solver
This repo provides a naive solver for the Prime Factorization Problem.
The naive solution is based on a while loop in which, starting from 2, we search for the next divisor until we find it and append it to the list of divisors.
Usage
Option 1: online
Using runkit. Simply click here and copy/paste this code:
const NaiveFactorizer = const factorizer = ; factorizer;factorizer;
Option 2: use npm
You will need node JS installed.
- Install the library:
npm install naive-factorization
- Run the below command:
node node_modules/naive-factorization/index.js>.fatorize 26435463prime? falsefactors: 1,3,307,28703elapsed seconds: 0.005
Option 3: clone this repo
You will need node JS installed.
You can clone this repo and start by running:
node index.js>.fatorize 26435463prime? falsefactors: 1,3,307,28703elapsed seconds: 0.005