Question
A highway agency sells billboard slots along a road, listed in order with the expected revenue for each (all positive). Local rules say two rented billboards must have at least two empty slots between them — so if you take slot i, the next one you take must be at index i+3 or later. Given the revenues, return the maximum total you can earn. An empty list returns 0. For example, [8, 3, 2, 9] gives 17 by taking slots 0 and 3.
max_billboard_revenue(revenues: list[int]) → int[[8,3,2,9]]out17[[10,1,1,1,10]]out20State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.