Leetcode 1781. Sum of Beauty of All Substrings | Hello Interview