
[LeetCode] 1358. Number of Substrings Containing All Three Characters (Python)
·
알고리즘/LeetCode
난이도: MediumProblem Description Given a string s consisting only of characters a, b and c. Return the number of substrings containing at least one occurrence of all these characters a, b and c. Problem ExampleExample 1:Input: s = "abcabc"Output: 10Explanation: The substrings containing at least one occurrence of the characters a, b and c are "abc", "abca", "abcab", "abcabc", "bca", "bcab", "bcab..