Verify Prime

Given a number N, verify if N is prime or not.

Return 1 if N is prime, else return 0.

Example :

Input : 7
Output : True

Problem Approach:

Complete code in the hint.

Interview Code Editor
Hints
  • Complete Solution
7242 successful submissions.
Click here to jump start your coding interview preparation