Problems > No Repeated Neighbour Digit > Editorial

No Repeated Neighbour Digit — Solution & Editorial

Back to the Problem

Digit DP with prefix difference and tight/leading flags.

Complexity: O(digits · states)