Rosetta Problems

Sum of Beauty of All Substrings

https://leetcode.com/problems/sum-of-beauty-of-all-substrings