Sponsored
Use these hints if you're stuck. Try solving on your own first.
Let dp[j][e] = s be the largest index for which S[s:e+1] has T[:j] as a substring.
Solve with full IDE support and test cases