Javalobby - Comments for "Algorithm of the Week: Rabin-Karp String Searching"
http://java.dzone.com/articles/algorithm-week-rabin-karp
Comments for "Algorithm of the Week: Rabin-Karp String Searching"enThis article is incorrect in
http://java.dzone.com/articles/algorithm-week-rabin-karp#comment-83243
<!--paging_filter--><p>This article is incorrect in two important ways:</p>
<p>(1) The hash function provided is O(m), where m is the length of the
pattern, and therefore the algorithm, as presented, is O(mn).</p>
<p>(2) The algorithm returns any string with the same hash as the pattern.</p>
<p>Students who might otherwise be confused by this article are invited
to check out the Wikipedia article on the technique; its coverage is
much more accurate.</p>Sun, 10 Jun 2012 11:10:01 -0400yaronlevy30comment 83243 at http://java.dzone.com