Next Prime | codewars 7kyu | Javascript

Опубликовано: 01 Май 2026
на канале: BINARY LIFE 1100
456
4

Next Prime | codewars 7kyu | Javascript

Kata = https://bit.ly/3qPoXi4

My GITHUB SOLUTION = https://bit.ly/3vCbON8

Prime Numbers - Sieve of Eratosthenes = https://bit.ly/3lqJPuM

Binary search algorithm = https://bit.ly/3cFqMJx

DESCRIPTION:
Get the next prime number!

You will get a number and your task is to find the next prime number.

Make sure to optimize your code: there will number tested up to about 10 ^ 12.

Examples
5 = 7
12 = 13