NeetCode #480LC-2707MediumTriesNC 250
← Back to All Problems

#480 · #2707 · Extra Characters in a String(字符串中的额外字符)

📌 Problem Statement & Constraints

You are given a string s and a dictionary of words. Break s into the dictionary words plus leftover single characters; return the minimum number of leftover characters. Constraints: 1 <= s.length <= 50, 1 <= dictionary.length <= 50, word lengths up to 50.
🔒

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!