Problem 3972 · Medium

Valid Subarrays With Matching Sum Digits II

Count the subarrays whose positive sum has the same digit at its first and last position, comparing sums through their decimal digits.

Open the interactive visualisation