Amazon Onsite | Word Break II variation
Anonymous User
1634

Coding Question:
A variation of Word Break II.

Example:

Input:
[abc, a, b, c, ab]

Output:

[
	[abc, a, b, c], 
	[abc, ab, c], 
	[ab, a, b]
]

Explanation:
abc can be formed by combining a, b, c
abc can be formed by combining ab, c
ab can be formed by combining a, b

Comments (3)