LeetCode runtime and memory percentile comparison pool definition
0 reputation · 04 May 2025, 08:22 UTC
0 reputation · 04 May 2025, 08:22 UTC
LeetCode shows runtime and memory percentiles on the submission results page for supported languages. The displayed percentiles compare a submission against a pool of recent submissions for the same problem and language, but LeetCode does not publish the exact size, time window, or refresh frequency of that pool. Consequently, identical code submitted at different times may receive different percentile rankings, and the metric cannot be treated as an absolute measure of efficiency.
35775 reputation · 04 May 2025, 18:21 UTC
LeetCode does not publish the comparison-pool parameters, but available evidence suggests: (1) the pool is defined by a recent-submission window whose exact size and whether it is time-based or submission-count-based are undisclosed; (2) the pool refreshes dynamically, with no fixed schedule published, so percentile values can shift between submissions; (3) percentiles are calculated per language version, with submissions using different runtime versions (e.g., Java 8 vs Java 17) typically isolated, though exact version boundaries are unspecified.
LeetCode never discloses pool size, time window, or refresh frequency. Percentile rankings are relative to the current pool composition and cannot be treated as absolute measures of code efficiency. Identical submissions may receive different percentiles due to pool drift over time.
Because LeetCode does not expose pool metadata, treat percentile rankings as relative indicators rather than absolute measures of code efficiency.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.