Easy · Math
Prime number
Given an integer n, return true if n is a prime number (an integer greater than 1 whose only positive divisors are 1 and itself), and false otherwise.
Examples
Example 1
n = 29Output: 29 is prime
Example 2
n = 91Output: 91 is not prime
Rebuild it in the studio
Open every published interview problem, solution, scene, and memory room free, with no account.