Number of Substrings Containing All Three Characters | Leetcode 1358