Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 140. Word Break II
Given a string s and a word dictionary, return all possible sentences formed by inserting spaces so every token is a dictionary word — i.e., enumerate all valid segmentations. The challenge is to generate all combinations efficiently by exploring prefixes and using memoization/DP to avoid exponential rework and prune impossible splits.
Asked at:
Meta
Bloomberg
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late October, 2025
Bloomberg
Junior
Early February, 2025
Meta
Mid-level
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.