Find the longest common substring of two given strings (Naive & Improve)