Merge a set of strings based on overlaps
This is the DNA sequence assembly problem, an algorithms problem that has been well studied in the literature.  You can apparently find entire courses on the subject.  In general, the problem is NP-hard.  However, there are many algorithms that seem to work well in practice; greedy assembly is one very simple approach, but there are many others.