@Dave: I think it is to find the longest substring which appears more than once in the given string.

@bittu:
You could use suffix tree: http://en.wikipedia.org/wiki/Suffix_tree, and find the deepest branch node. or use suffix array: http://en.wikipedia.org/wiki/Suffix_array, and find the length of common prefix of neighbouring elements, then choose the maximum.

On 2011-2-25 1:46, Dave wrote:
@Bittu: Your statement of the problem doesn't make any sense.
Apparently, you are given a string and somehow that string is
repeated. Can you clarify it and give an example?

Dave

On Feb 24, 10:24 am, bittu<shashank7andr...@gmail.com>  wrote:
Given a string (assume there no spaces or punctuations), write a
program that returns the max. length of the string that has repeated
more than once.

Thanks
Shashank

--
You received this message because you are subscribed to the Google Groups "Algorithm 
Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to