NeetCode #521LC-140HardBacktrackingNC 250
← Back to All Problems

#521 · #140 · Word Break II(单词拆分 II)

📌 Problem Statement & Constraints

Given a string s and a dictionary wordDict, add spaces to construct sentences where every word is in the dictionary. Return all such sentences in any order. Words may be reused. Constraints: 1 <= s.length <= 20, 1 <= wordDict.length <= 1000, word lengths up to 10.
🔒

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!