For a given number N check if it is prime or not. A prime number is a number which is only divisible by 1 and itself.
N = 5
5 has 2 factors 1 and 5 only.
N = 25
25 has 3 factors 1, 5, 25
You don't need to read input or print anything. Your task is to complete the function isPrime() which takes an integer N as input parameters and returns an integer, 1 if N is a prime number or 0 otherwise.
Expected Time Complexity: O(sqrt(N)) Expected Space Complexity: O(1)