Tribhuvan nath Sagar’s Post

View profile for Tribhuvan nath Sagar, graphic

JAVA | SQL | Spring boot | Tailwind | JAVASCRIPT | React

Leet Code 204: Medium marked Solved Today: Count primes Input: n = 10 Output: 4 Explanation: There are 4 prime numbers less than 10: 2, 3, 5, and 7. Using sieve of Eratosthenes It is the simple approach to find the prime number in the number in optimal time and space complexity. Space complexity: O(n) Time complexity: O(n*log(log(n))) #leetcode #algorithm #problemsolving #medium

  • No alternative text description for this image
Aman Kumar Soni

👨🎓MCA'25 || Ex- Future Ready Talent Intern at Microsoft

5mo

Good to know!

Like
Reply

To view or add a comment, sign in

Explore topics