String match algorithm?

Discussion in 'Java' started by syncmaster1113, Feb 12, 2009.

  1. syncmaster1113

    syncmaster1113

    Joined:
    Feb 12, 2009
    Messages:
    1
    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
    syncmaster1113, Feb 12, 2009
    #1
    1. Advertising

  2. syncmaster1113

    pinto

    Joined:
    Feb 11, 2009
    Messages:
    12
    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
    pinto, Feb 12, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hiwa
    Replies:
    0
    Views:
    636
  2. Victor
    Replies:
    2
    Views:
    642
    Victor
    May 17, 2004
  3. hn.ft.pris@gmail.com
    Replies:
    1
    Views:
    440
    Joe Seigh
    Dec 15, 2006
  4. ekzept
    Replies:
    0
    Views:
    368
    ekzept
    Aug 10, 2007
  5. Old Echo
    Replies:
    1
    Views:
    180
    Adam Shelly
    Sep 4, 2008
Loading...

Share This Page