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
Read every interview problem free. Ten rooms need no account. A token opens a problem in full — Pro never counts.