[buug] substring of integers problem

Karen Hogoboom khogoboom at gmail.com
Fri Feb 4 05:47:42 PST 2011


You may find this helpful:

http://en.wikipedia.org/wiki/Longest_common_substring_problem

Just substitute digits with minus (and plus too if you allow it) as the
alphabet instead of letters.  I think you'd make two copies of the string
and find the common substrings that don't start at the same position.

These algorithms were what I was originally thinking of, but that's if you
know the substring you're searching for:

http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=stringSearching
http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm


Karen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buug.org/pipermail/buug/attachments/20110204/835c7ce3/attachment.html>


More information about the buug mailing list