doubt in sieve in linear time

Правка en2, от Aden_blizzard, 2021-02-07 09:06:31

https://cp-algorithms.com/algebra/prime-sieve-linear.html in this code for sieve in linear time complexity what is the use of pr[j]<=lp[i]? is there any reason to write this as i tried many test case but it works fine without this ....is there any case where it fails?

Теги sieve

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Aden_blizzard 2021-02-07 09:06:31 281
en1 Английский Aden_blizzard 2021-02-07 09:05:46 510 Initial revision (published)