In this video, I have presented a solution for finding the longest common substring with the use of suffix tree. The solution presented uses Ukkonen's algorithm and takes linear time for processing.
Visuals adapted from:
http://brenden.github.io/ukkonen-animation/