Describe a program to determine whether or not an integer is prime.
Interview Answers
Anonymous
7 Jun 2025
Say the integer is n, check whether n is divisible by any integer i where 2 conclude that n is prime.
Anonymous
5 Mar 2019
May I ask how many coding question you had? And is it through coderpad? Many thanks!
1
Anonymous
18 Apr 2019
This is an easy question, man. At least you could provide a solution with the worst complexity of sqrt(n) and average sqrt(n / log(n) ).
And next, they could move on to the case of bits shifting.