#3760

Maximum Substrings With Distinct Start

pupil · 375 · lc medium +23 · 91.4% accepted · 69 likes · top 100%

Description

Given a string s of lowercase English letters, determine the maximum number of non-overlapping substrings that s can be partitioned into such that no two substrings begin with the same character.

Code

1
2
3