1525. Number of Good Ways to Split a String
https://leetcode.com/problems/number-of-good-ways-to-split-a-string
Description
You are given a string s
, a split is called good if you can split s
into 2 non-empty strings p
and q
where its concatenation is equal to s
and the number of distinct letters in p
and q
are the same.
Return the number of good splits you can make in s
.
Example 1:
Example 2:
Example 3:
Example 4:
Constraints:
s
contains only lowercase English letters.1 <= s.length <= 10^5
ac
Previous1524. Number of Sub-arrays With Odd SumNext1526. Minimum Number of Increments on Subarrays to Form a Target Array
Last updated