pigeonhole-26-letter-bound

Status: IN

The first-letter-to-appear-twice loop executes at most 27 iterations regardless of string length, since 26 lowercase letters force a collision by the 27th character via the pigeonhole principle.

Source: entries/2026/06/06/first-letter-to-appear-twice-solution.md

JSON