- Joined
- Feb 12, 2009
- Messages
- 1
- Reaction score
- 0
Does anyone can suggest an efficient algorithm on string match
if the strings are "aaa", then output is A
if the strings are "aba", then output is B
1. aaa - > A
2. aba -> B
for instance,
input : aaaabaaaa -> output : ABA
aaa : A, aba : B, aaa:A
input aaababaaaabbababa -> output : ABAB
aaa : A, aba : B, aaa :A,aba : B
if the strings are "aaa", then output is A
if the strings are "aba", then output is B
1. aaa - > A
2. aba -> B
for instance,
input : aaaabaaaa -> output : ABA
aaa : A, aba : B, aaa:A
input aaababaaaabbababa -> output : ABAB
aaa : A, aba : B, aaa :A,aba : B