use suffix array time will be O(N) e.g. in case of banana answer will be ana
you can find more info here http://shashank7s.blogspot.com/2011/06/longest-repeated-substring-eg-maximum.html Thanks Shashank "I Don't Do Code to Code But I Do Code to Build Product" Computer Science & Engineering Birla Institute of Technology,Mesra -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
