Leetcode 2949. Count Beautiful Substrings II | Hello Interview