Return all valid word-break sentences | Amazon Interview Question