Hi.I need an algorithm that finds out the longest substring of 2 strings .
It's for school project .
Printable View
Hi.I need an algorithm that finds out the longest substring of 2 strings .
It's for school project .
Post your progress.
my progress is 60 %
I tried to do something and partially it works (it finds a substring but not the longest) .
It's also probably the most uneficient algorithm ever .
I hoped someone knows a "standard" algorithm , or the location where I can find it in a book , website ,etc...
i've fixed the errors but it's still ugly ....
maybe redesign and a few comments will help
classical dynamic programming problem. search google with these terms.
When they said "post your progress", it didn't mean tell them your estimate of how far along you were in a percentage. It meant post your code if you want some help. But hey, random number progress reports work too.
This post's progress is roughly 97%, with a 4% margin of error.
Quzah.
Introduction to algorithms, chapter 15.4. The solution is in pseudo code.