Super String
CodeChefOpen on judge ↗
For a set of $n$ strings in array $A$, find the shortest string that has each string in $A$ as its substring. A string $p$ is a substring of string $q$ if any contiguous set of characters of $q$ match $p$. In this case, $q$ is called a superstring of $p$. ###Input Format The first line of input is an integer $n$, the number of strings to input. The next $n$ lines are the $n$ input substrin
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start