Leetcode 1525. Number of Good Ways to Split a String
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.