1759. Count Number of Homogenous Substrings
https://leetcode.com/problems/count-number-of-homogenous-substrings
Description
Given a string s
, return the number of homogenous substrings of s
. Since the answer may be too large, return it modulo 109 + 7
.
A string is homogenous if all the characters of the string are the same.
A substring is a contiguous sequence of characters within a string.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= s.length <= 105
s
consists of lowercase letters.
ac
Previous1758. Minimum Changes To Make Alternating Binary StringNext1760. Minimum Limit of Balls in a Bag
Last updated