Exercises/#57 Word Break
#57

Word Break

Medium🧩 Dynamic Programming
90 XP

Problem

Given a string s and a dictionary wordDict, return true if s can be segmented into space-separated dictionary words.

Examples

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

Input: s='applepenapple', wordDict=['apple','pen']
Output: true
dynamic-programmingstringtrie
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

57 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features