A driver visits warehouses in a fixed order, earning or paying at each stop. Starting at the first and ending at the last, and skipping at most K warehouses in a row, maximize the net earnings.
A driver visits warehouses in a fixed order, earning or paying at each stop. Starting at the first and ending at the last, and skipping at most K warehouses in a row, maximize the net earnings.
The discussion opens with the full question.