Two passes, two lower bounds
transcript
Six accounts sit in a row. Each has a rating. A higher rating gets more units. That depends on both sides. One pass sees one side only. So we make two passes.
Everyone gets at least one unit. A higher rating than a neighbour needs more. One pass cannot see both sides. Equal ratings need no rule. Each rule looks at one neighbour. So split the rules in two.
The left pass raises a rising rating. It totals eight. But account two is too low. It only knows the left neighbour. That is a lower bound. No plan can go below it.
The right pass fixes the falling side. It keeps the larger value. Account two becomes three. It knows the right neighbour. That is a second lower bound.
The total is thirteen. Each pass is a lower bound. The larger one follows both rules. Full breakdown in the lecture.