{"id":"smaller-numbers-counting-sort-approach","text":"`smallerNumbersThanCurrent` uses counting sort + prefix sum over the fixed value range [0,100] to achieve O(n+k) time, avoiding the naive O(n²) pairwise comparison.","truth_value":"IN","source":"entries/2026/06/06/how-many-numbers-are-smaller-than-the-current-number-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"smaller-numbers-counting-sort-approach","truth_value":"IN","reason":"premise"}]}}