simulation-to-formula-pattern

Status: IN

Multiple solutions (e.g., `time_to_buy_tickets`) replace explicit round-by-round simulation with per-element contribution formulas, reducing time complexity from O(n·k) to O(n) by reasoning about how many rounds each element participates in.

Source: entries/2026/06/06/time-needed-to-buy-tickets-solution.md

JSON