String match algorithm?

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
 
Joined
Feb 11, 2009
Messages
12
Reaction score
0
Can you provide more rules?
"input aaababaaaabbababa -> output : ABAB
aaa : A, aba : B, aaa :A,aba : B" - Not clear how it is translated to ABAB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top