本文介绍了在多个文本中找到最长的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下问题。有两个给定的文本,我需要找到两个文本中出现的最长的字符串。我认为我们应该创建一个字符串数组,在其中放置常见的字符串,然后比较它们的长度和最大打印长度。
I have the following problem. There are two given text and I need to find the longest string that occurs in both. I think we should create a string array where we should put common strings and then compare their length and which length will be largest print. Is there a fast method to this?
推荐答案
最长的常见子字符串问题:
The longest common substring problem:http://en.wikipedia.org/wiki/Longest_common_substring_problem
这篇关于在多个文本中找到最长的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!