1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-06 07:51:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2023-12-09 19:57:46 +08:00
parent 9bc4722a45
commit 3770b44d1e
4792 changed files with 10889 additions and 10886 deletions

View File

@@ -11,7 +11,7 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 312,
"likes": 314,
"dislikes": 30,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Count Primes\", \"titleSlug\": \"count-primes\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
@@ -161,7 +161,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"24.9K\", \"totalSubmission\": \"75.7K\", \"totalAcceptedRaw\": 24938, \"totalSubmissionRaw\": 75749, \"acRate\": \"32.9%\"}",
"stats": "{\"totalAccepted\": \"24.9K\", \"totalSubmission\": \"75.8K\", \"totalAcceptedRaw\": 24945, \"totalSubmissionRaw\": 75760, \"acRate\": \"32.9%\"}",
"hints": [
"Pre-compute all the prime numbers in the range [1, n] using a sieve, and store them in a data structure where they can be accessed in O(1) time.",
"For x in the range [2, n/2], we can use the pre-computed list of prime numbers to check if both x and n - x are primes. If they are, we add them to the result."