Leetcode 2947. Count Beautiful Substrings I | Hello Interview