1358. Number of Substrings Containing All Three Characters
https://leetcode.com/problems/number-of-substrings-containing-all-three-characters
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.
Example 1:
Example 2:
Example 3:
Constraints:
3 <= s.length <= 5 x 10^4
s
only consists of a, b or ccharacters.
ac
Last updated