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
49.9%
Submissions
1,361
Accepted
679