Company: Ibm_24dec
Difficulty: medium
Count Unique Character Substrings Problem Description Implement a function that determines the total number of substrings in a given string text that contain distinct characters. Two substrings are considered different if they start or end at different positions. The function countUniqueSubstrings takes the following input: string text : the input string The function should return an integer representing the total number of substrings having all unique characters. Examples Example 1: Input: text = "abac" Output: 8 Explanation: There are 8 substrings in "abac" that have no repeating characters: "a", "b", "a", "c", "ab", "ba", "ac", and "bac". Hence, the answer is 8. Example 2 (from Sample Case 0): Input: text = "bcada" Output: 12 Explanation: There are 12 substrings in "bcada" that have no repeating characters: "b", "c", "a", "d", "a", "bc", "ca", "ad", "da", "bca", "cad", and "bcad". Hence, the answer is 12. Example 3 (from Sample Case 1): Input: text = "abcd" Output: 10 Explanation: T