mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 00:11:41 +08:00
update
This commit is contained in:
@@ -161,7 +161,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"6K\", \"totalSubmission\": \"17.4K\", \"totalAcceptedRaw\": 5974, \"totalSubmissionRaw\": 17394, \"acRate\": \"34.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"6K\", \"totalSubmission\": \"17.4K\", \"totalAcceptedRaw\": 5977, \"totalSubmissionRaw\": 17397, \"acRate\": \"34.4%\"}",
|
||||
"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."
|
||||
|
Reference in New Issue
Block a user