An interesting problem about String

Правка en2, от I_need_7.0_IELTS, 2023-04-08 17:53:56

Statement

Given $$$n$$$ strings. Find the string $$$s$$$ with minimum length such that each of $$$n$$$ given strings is a substring of $$$s$$$.

Example:

Input:

3
ab
ba
abb

Output:

abba

This problem is hard for me. Can you give me a hint? Thank you in advance.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский I_need_7.0_IELTS 2023-04-08 18:01:51 81 Tiny change: 'n <= 50$\nEvery of' -> 'n <= 50$\n\nEvery of'
en2 Английский I_need_7.0_IELTS 2023-04-08 17:53:56 4 Changed from "minimal" to "minimum". Sorry for my wrong grammar.
en1 Английский I_need_7.0_IELTS 2023-04-08 17:05:21 344 Initial revision (published)