Retire the last slot, not the first
transcript
Ad slots earn their bid times two neighbours. You must retire every slot, in some order. Which slot should go first? Ask which goes last instead.
Retiring the smallest bid first sounds sensible. It earns only seventy-eight in total. Thinking backwards earns one hundred sixty-seven.
Pick one slot to retire last in a range. Its neighbours are the two ends of the range. So the two sides never touch each other. Each side is a smaller range with its own cell.
Now fill the table by range length. Short ranges come first. Long ranges read the short ones. By then, both sides are ready.
Two hundred slots is the limit here. The table takes about 1,353,400 steps. That runs in well under a second.
Name the decision that comes last. Add the two smaller cells and its own gain. Fill the table by increasing length.
Find the decision that separates the sides. Try the last one when the first fails. Full breakdown in the lecture.