Click here to Skip to main content
15,891,136 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: can you tell me how to do this Pin
cp987630-Aug-07 13:51
cp987630-Aug-07 13:51 
GeneralRe: can you tell me how to do this Pin
Russell'30-Aug-07 22:03
Russell'30-Aug-07 22:03 
GeneralRe: can you tell me how to do this Pin
Paul Conrad31-Aug-07 16:54
professionalPaul Conrad31-Aug-07 16:54 
GeneralRe: can you tell me how to do this Pin
Tim Craig31-Aug-07 17:59
Tim Craig31-Aug-07 17:59 
AnswerRe: can you tell me how to do this Pin
Russell'30-Aug-07 8:00
Russell'30-Aug-07 8:00 
QuestionData Sample Synchronization Pin
Anthony988729-Aug-07 7:52
Anthony988729-Aug-07 7:52 
AnswerRe: Data Sample Synchronization Pin
Russell'29-Aug-07 8:16
Russell'29-Aug-07 8:16 
QuestionSubstring Matching (Harder than it sounds) [modified] Pin
Skippums29-Aug-07 5:54
Skippums29-Aug-07 5:54 
I need an algorithm that returns the longest exact matching substring from two strings. For example, passing in the strings "abacadaba" and "dbaadabb" would return "adab". The best way that I can think of would be to construct a boolean table of size m by n, and check each character for a match and put a true value if they match and false if they don't. Then I could look along each diagonal for the largest consecutive set of true values. However, this algorithm takes O(n*m) memory, O(n*m) time to build the table, then O(n*m) time to look for the longest diagonal. There is definitely an algorithm that runs faster, but I cannot figure out what it is. I was wondering if anyone has a better idea as to how I can accomplish this task. Thanks


-- modified at 12:19 Wednesday 29th August, 2007
AnswerRe: Substring Matching (Harder than it sounds) Pin
Russell'29-Aug-07 6:21
Russell'29-Aug-07 6:21 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums29-Aug-07 6:30
Skippums29-Aug-07 6:30 
AnswerRe: Substring Matching (Harder than it sounds) Pin
Luc Pattyn29-Aug-07 6:32
sitebuilderLuc Pattyn29-Aug-07 6:32 
AnswerRe: Substring Matching (Harder than it sounds) [modified] Pin
Skippums29-Aug-07 7:42
Skippums29-Aug-07 7:42 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Russell'29-Aug-07 8:06
Russell'29-Aug-07 8:06 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums29-Aug-07 8:28
Skippums29-Aug-07 8:28 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Russell'29-Aug-07 9:02
Russell'29-Aug-07 9:02 
AnswerRe: Substring Matching (Harder than it sounds) Pin
PIEBALDconsult29-Aug-07 18:03
mvePIEBALDconsult29-Aug-07 18:03 
AnswerRe: Substring Matching (Harder than it sounds) Pin
Mark Churchill29-Aug-07 18:26
Mark Churchill29-Aug-07 18:26 
AnswerRe: Substring Matching (Harder than it sounds) Pin
cp987629-Aug-07 23:55
cp987629-Aug-07 23:55 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums30-Aug-07 4:04
Skippums30-Aug-07 4:04 
AnswerRe: Substring Matching (Harder than it sounds) Pin
Skippums4-Sep-07 11:23
Skippums4-Sep-07 11:23 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Luc Pattyn4-Sep-07 13:06
sitebuilderLuc Pattyn4-Sep-07 13:06 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums4-Sep-07 13:26
Skippums4-Sep-07 13:26 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Luc Pattyn5-Sep-07 9:00
sitebuilderLuc Pattyn5-Sep-07 9:00 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Skippums5-Sep-07 10:46
Skippums5-Sep-07 10:46 
GeneralRe: Substring Matching (Harder than it sounds) Pin
Member 419459329-Mar-08 9:55
Member 419459329-Mar-08 9:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.