chore(Java): add sieve of eratosthenes #1117
parent
4c7d2880ab
commit
d8272848fd
|
@ -49,4 +49,8 @@ public class Sieve_of_Eratosthenes {
|
||||||
/* Time Complexity: O(n*log(log(n)))
|
/* Time Complexity: O(n*log(log(n)))
|
||||||
Auxiliary Space: O(n)
|
Auxiliary Space: O(n)
|
||||||
Constraint: n = 10,000,000
|
Constraint: n = 10,000,000
|
||||||
|
|
||||||
|
Input: 100
|
||||||
|
Output: Following are the prime numbers: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97
|
||||||
|
|
||||||
*/
|
*/
|
Loading…
Reference in New Issue