Expense Rule Engine is a small library that checks a batch of expenses against a company's spending rules. Rules are written as plain text, such as R1: category == meals and amount > 75. Each expense is a line of comma-separated text, and check() returns a Violation for every rule an expense breaks.
The round has four phases:
Most of the difficulty is in edge cases that an assistant will skip unless you name them. Amounts must be exact, a trip with nothing to count still gets checked, a resubmitted expense keeps its original place, and results follow rule order even after you index the rules.
Each of these has its own hidden test, and most have a plausible but wrong version built to fail it.