Describe a program to determine whether or not an integer is prime.
Risposte di colloquio
Anonimo
7 giu 2025
Say the integer is n, check whether n is divisible by any integer i where 2 conclude that n is prime.
Anonimo
5 mar 2019
May I ask how many coding question you had? And is it through coderpad? Many thanks!
1
Anonimo
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.