{"id":"counter-over-simulation-pattern","text":"`countStudents` replaces O(n^2) queue simulation with O(n) frequency counting via `Counter`, recognizing that queue position determines eating order but not eating possibility.","truth_value":"IN","source":"entries/2026/06/06/number-of-students-unable-to-eat-lunch-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":["simulation-elimination-via-preprocessing"],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"counter-over-simulation-pattern","truth_value":"IN","reason":"premise"}]}}