Pergunta de entrevista da empresa Unthinkable

Longest common substring problem : worst case and best case time complexity