seive

Revision en1, by z_e_z_e, 2021-05-05 00:44:49

hello, I want to ask you a question , what is the real time complexity of seive? is it nlog(log(n)) or sqrt(n)log(log(n)) , and why? and whish loop of this code is cost that time complexity ? 1- for(int i=2; i<=n; i++) { 2- if(isprime[i]) 3- { for(int j=i*i; j<=n; j+=i) isprime[j]=0; } }

thanks alot.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English z_e_z_e 2021-05-05 00:44:49 362 Initial revision (published)