Find Score of an Array After Marking All Elements
Repeatedly take the smallest unmarked value, then mark it and its two neighbours, adding only the value taken.
Repeatedly take the smallest unmarked value, then mark it and its two neighbours, adding only the value taken.