4087. Maximum Substrings With Distinct Start
My accepted Python solution to LeetCode problem 4087, Maximum Substrings With Distinct Start, running in 8ms.
- Difficulty: Medium
- Python
- Runtime 8ms
- Memory 18.3MB
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 8ms, memory 18.3MB, accepted 2025-12-30.
class Solution:
def maxDistinct(self, s: str) -> int:
return len(set(s))