Company: Autodesk_11april
Difficulty: medium
Distinct Consecutive Triplets Problem Description Given a string `s` consisting of lowercase English letters, find the number of consecutive triplets within `s` formed by unique characters. In other words, count the number of indices `i`, such that `s[i]`, `s[i + 1]`, and `s[i + 2]` are all pairwise distinct. Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than `O(s.length^2)` will fit within the execution time limit. Examples Example 1: Input: s = "abcdaaae" Output: 1 Explanation: For `i = 0`, `s[0] = 'a'`, `s[1] = 'b'`, and `s[2] = 'c'` which are pairwise distinct. For `i = 1`, `s[1] = 'b'`, `s[2] = 'c'`, and `s[3] = 'd'` which are pairwise distinct. For `i = 2`, `s[2] = 'c'`, `s[3] = 'd'`, and `s[4] = 'a'` which are pairwise distinct. For `i = 3`, `s[3] = 'd'`, `s[4] = 'a'`, and `s[5] = 'a'` which are not pairwise distinct because `s[4]` and `s[5]` are equal. For `i = 4`, `s[4] = 'a'`, `s[5] = 'a'`, and `s[6] = 'a'` whic