Thread: longest common substring problem

  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    2

    Exclamation longest common substring problem

    hi all;

    now i am trying to solve a problem called longest common substring..this problem is to find the longest string (or strings) that is a substring (or are substrings) of two or more strings.

    example: search
    researcher

    the longest common substring is search..i couldn't find the answer i am doing something wrong but i don't know where..can you help me?

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    can you help me?
    If you post what you have this far, or at least a description of the steps how you would tackle it.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    2

    Exclamation

    i have written some codes but they are useless i think..i just want to learn the way..i don't know trees but i think in this problem i must use trees is there any other way to do it?

  4. #4
    NotSoAvgProgrammer
    Join Date
    Jul 2007
    Location
    Virginia, U.S.
    Posts
    57
    I think it would better benefit you if you did it on your own, rather than getting someone else to do it for you. It would certainly help when test time comes around.
    A quality job is not necessarily a *good* job. A quality job is, by definition, conformance to requirements. Therefore a *good* job, may not be a quality job.

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 11-07-2005, 11:34 PM
  2. searching problem
    By DaMenge in forum C Programming
    Replies: 9
    Last Post: 09-12-2005, 01:04 AM
  3. Bin packing problem....
    By 81N4RY_DR460N in forum C++ Programming
    Replies: 0
    Last Post: 08-01-2005, 05:20 AM
  4. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM
  5. binary tree problem - help needed
    By sanju in forum C Programming
    Replies: 4
    Last Post: 10-16-2002, 05:18 AM