Trial division Algorithm for Prime Factorization
In this article, the trial division method to check whether a number is a prime or not is discussed. Given a number N, the task is to check whether the number is prime or not. Examples: Input: N = 433 Output: Prime Explanation: The only factors of 433 are 1 and 433. Therefore, it is a prime. Input: