Approach hintTry it first, then revealHide
Removing one stone fixes one pair of neighbouring stones with equal colours; count how many such pairs exist in a single pass.
Removing one stone fixes one pair of neighbouring stones with equal colours; count how many such pairs exist in a single pass.