2025/04/02 4

[Leetcode] 1525. Number of Good Ways to Split a String

문제You are given a string s.A split is called good if you can split s into two non-empty strings sleft and sright where their concatenation is equal to s (i.e., sleft + sright = s) and the number of distinct letters in sleft and sright is the same.Return the number of good splits you can make in s. Example 1:Input: s = "aacaba" Output: 2 Explanation: There are 5 ways to split "aacaba" and 2 of th..

Leetcode 2025.04.02