Given two strings str1 and str2, implement a function that concatenates them by merging the longest common substring that appears as a suffix of str1 and a prefix of str2.
Constraints:
- 1 ≤
str1.length,str2.length≤ str1andstr2only consist of lowercase English letters.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected