Count Unique Characters of All Substrings of a Given String | Leetcode 828