1180. Count Substrings with Only One Distinct Letter
https://leetcode.com/problems/count-substrings-with-only-one-distinct-letter
Description
Given a string s
, return the number of substrings that have only one distinct letter.
Example 1:
Example 2:
Constraints:
1 <= s.length <= 1000
s[i]
consists of only lowercase English letters.
ac
Last updated