---
title: "Discussion on \"LeetCode 204 Count Primes - Sieve of Eratosthenes Solution (Med, Java, O(n√n))\" | Hashnode"
description: "Discussion on \"LeetCode 204 Count Primes - Sieve of Eratosthenes Solution (Med, Java, O(n√n))\". From Ancient Mathematics to Modern Algorithms: Efficiently Finding All Primes Below n"
url: "https://hashnode.com/posts/leetcode-204-count-primes-sieve-of-eratosthenes-solution-med-java-onn/6873376137ec115b36ed53d4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [LeetCode 204 Count Primes - Sieve of Eratosthenes Solution (Med, Java, O(n√n))](https://huanganni.hashnode.dev/leetcode-204-count-primes-sieve-of-eratosthenes-solution-med-java-onn?utm_source=hashnode&utm_medium=feed)

From Ancient Mathematics to Modern Algorithms: Efficiently Finding All Primes Below n

Jul 13, 2025 · 5 min read · huanganni.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)
-   [#java](https://hashnode.com/tag/java)
-   [#prime](https://hashnode.com/tag/prime)
-   [#sieve-of-eratosthenes](https://hashnode.com/tag/sieve-of-eratosthenes)

## Written by

[Anni Huang](https://hashnode.com/@HuangAnni)

@HuangAnni · Singapore

  
[View profile](https://hashnode.com/@HuangAnni)

LLM Training Operation Specialist @ ByteDance | Ex-Master of IT in Business (AI track) at SMU

I’m Anni Huang, an AI researcher-in-training currently at ByteDance, specializing in LLM training operations with a coding focus. I bridge the gap between engineering execution and model performance, ensuring the quality, reliability, and timely delivery of large-scale training projects.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
