From 4c7d2880ab52f2d0c055ea64faeddf542f03cb00 Mon Sep 17 00:00:00 2001 From: "mihirsuman0131@gmail.com" Date: Sat, 24 Dec 2022 15:25:47 +0530 Subject: [PATCH] chore(Java): add sieve of eratosthenes (#1117) --- algorithms/Java/Maths/Sieve_of_Eratosthenes.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/algorithms/Java/Maths/Sieve_of_Eratosthenes.java b/algorithms/Java/Maths/Sieve_of_Eratosthenes.java index 2151c7ce..df925f16 100644 --- a/algorithms/Java/Maths/Sieve_of_Eratosthenes.java +++ b/algorithms/Java/Maths/Sieve_of_Eratosthenes.java @@ -43,4 +43,10 @@ public class Sieve_of_Eratosthenes { } } } -} \ No newline at end of file +} + + +/* Time Complexity: O(n*log(log(n))) + Auxiliary Space: O(n) + Constraint: n = 10,000,000 + */ \ No newline at end of file