NeetCode #138LC-2405MediumArrays & Hashing
← Back to All Problems#138 · #2405 · Optimal Partition of String(子字符串的最优划分)
📌 Problem Statement & Constraints
Given a string
s, partition it into the minimum number of substrings such that each letter appears in at most one substring. Return that minimum number. Constraints: 1 <= s.length <= 10^5, lowercase letters.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!