{"id":"following-key-no-terminal-guard","text":"`most_frequent_number_following_key_in_an_array` raises `IndexError` if `key` only appears at the terminal position — the `range(len-1)` bound correctly skips it, but if no earlier occurrence exists the `Counter` is empty and `most_common(1)[0][0]` fails.","truth_value":"IN","source":"entries/2026/06/06/most-frequent-number-following-key-in-an-array-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"following-key-no-terminal-guard","truth_value":"IN","reason":"premise"}]}}