I searched online for a C++ Longest Common Substring implementation but failed to find a decent one. I need a LCS algorithm that returns the substring itself, so it\'s not j
The answer is GENERALISED SUFFIX TREE. http://en.wikipedia.org/wiki/Generalised_suffix_tree
You can build a generalised suffix tree with multiple string.
Look at this http://en.wikipedia.org/wiki/Longest_common_substring_problem
The Suffix tree can be built in O(n) time for each string, k*O(n) in total. K is total number of strings.
So it's very quick to solve this problem.