Word Break

Medium

📝 Description

Determine if string can be segmented into dictionary words

Input Format

String and dictionary of words

Output Format

true/false

Constraints

1 ≤ s.length ≤ 300

🔍 Sample Input

leetcode
["leet","code"]
            

✅ Sample Output

true
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run