mardi 15 janvier 2019

what is the fastest algorithm to identify prime numbers from an array of random numbers?

I have an array of random numbers and i have to return the prime numbers from that array. I am familiar with root(n) solution(n being that particular number not the size of the array). I can not apply sieve of Eratosthenes as it works with numbers in certain range but here the numbers are completely random.

Please correct me if i am missing something. Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire