djassie78
February 2nd, 2008, 09:03 PM
Hi All,
I need an efficient algorithm for this trouble. I need a function f(A,B) which says if string B is contained in string A. The characters of string B only need to be in the right order, like in this example
A = 1 2 3 4 5 6 7 8 9
B = 2 5 9
in this example find(A,B) should say B is contained in A. Does anyone knows an efficient algorithm to do that? Thanks,
I need an efficient algorithm for this trouble. I need a function f(A,B) which says if string B is contained in string A. The characters of string B only need to be in the right order, like in this example
A = 1 2 3 4 5 6 7 8 9
B = 2 5 9
in this example find(A,B) should say B is contained in A. Does anyone knows an efficient algorithm to do that? Thanks,