solulubeta
Sign in
Recursion & Memo / DP patterns for coding tests
04.15 · Problem

Word Break

Medium Cut into pieces LC 139 Pro

Return true if s can be split into words from wordDict. A word may be used many times.

Examples

Example 1

Input:  s = "leetcode", wordDict = ["leet", "code"]
Output: true

Example 2

Input:  s = "applepenapple", wordDict = ["apple", "pen"]
Output: true
solulu Pro

Continue this problem with Pro

Inside: step-by-step hints · 12 hidden tests · reference solutions · code editor.

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 41 of 44 · updated 2026-10-13