Sponsored
Use these hints if you're stuck. Try solving on your own first.
Try finding the largest prefix from a that matches a suffix in b
Try string matching
Solve with full IDE support and test cases