正在加载图片...
IVERSITY ScIE\CE TECH\OLoGY 8.1 Brute force算法 CHINA Brute force Check for pattern starting at every text position, trying to match any substring of length m in the text with the pattern Analysis of brute force Running time depends on pattern and text. can be slow when strings repeat themselves Worst case: O(MN) comparisons. too slow when M and N are large 021/2 &T2021/2/4 Department of Computer Science & Technology 9 8.1 Brute Force 算法 ◼ Brute force: Check for pattern starting at every text position, trying to match any substring of length m in the text with the pattern 。 Analysis of brute force. ➢ Running time depends on pattern and text. ➢ can be slow when strings repeat themselves Worst case: O(MN) comparisons. ➢ too slow when M and N are large
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有