Word Overlapping
Challenge Difficulty: Medium | Estimated completion time: ~20 minutes
Given two words, overlap them in such a way, morphing the last few letters of the first word with the first few letters of the second word.
Return the shortest overlapped word possible.
Examples
overlap("sweden", "denmark")
output = "swedenmark"
overlap("honey", "milk")
output = "honeymilk"
overlap("dodge", "dodge") "dodge"Solution
Python
Output