Available question text
Given a lowercase string s (n ≤ 1e5), count the split positions where the left and right substrings have the same number of distinct letters; this is typically solved in O(n) by computing prefix and suffix distinct-count arrays and counting matches.
Related questions
Continue with questions that share topics or the same question type.
- Number of Ways to Split a String
Coding
- Number of Ways to Form a Target String Given a Dictionary
Coding · Array · Dynamic Programming · String
- Number of Ways to Split Array
Coding
- Split a String Into the Max Number of Unique Substrings
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1525. Number of Good Ways to Split a String
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source