Number of Substrings Containing All Three Characters

Solution Code

Time Complexity

O(n)

Space Complexity

O(1)