3911. Find the Shortest Superstring II

Easy
String

Description

Hints

Hint 1
Check for the maximum suffix of one string that matches a prefix of the other (in both directions) and merge accordingly.

Statistics

Acceptance
48.7%
Submissions
1,525
Accepted
742