In computer science, a longest common substring of two or more strings is a longest string that is a substring of all of them. There may be more than one longest common substring. Applications include data deduplication and plagiarism detection. The strings "BADANAT" and "CANADAS" share the maximal-length substrings "ADA" and "ANA". The picture shows two strings where the problem has multiple solu