Why random number a have to be in range of [2,n-2]
Rnage of random number
as without doing this my all test cases has pass in challenges section of primality test
you can also ignore it, depends on the logic you have build, if have any issues then you can take reference from this
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.