word break

16 / 21 test cases passed.
Status: Wrong Answer
Submitted: 4 minutes ago
Input:	"cars", ["car","ca","rs"]
Output:	false
Expected:	true
made some mistakes about get substring . both the start index and length is wrong.