type
status
date
slug
summary
tags
category
icon
password

题目

Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.
Note that the same word in the dictionary may be reused multiple times in the segmentation.
Example 1:
Example 2:

解题思路

 
Leetcode 2462. Total Cost to Hire K WorkersLeetcode 139. Word Break