@shady : for this question Given a string of length N, find whether there exits an even length reverse substring of a substring.
you can use hastable , as i have mentioned above. On Thu, Dec 29, 2011 at 5:50 PM, shady <[email protected]> wrote: > oh, i didn't read all the posts, anyway i have understood lucifier's > O(n^2) time solution. > > > and ya what's the solution for this question? > Given a string of length N, find whether there exits an even length > reverse substring of a substring. > > On Thu, Dec 29, 2011 at 2:23 PM, atul anand <[email protected]>wrote: > >> >> @shady : lets go with this one:- >> >> given string = *abcdrdcba >> >> abcd != dcba - not a palindrome >> **abcd != dcba - **not a palindrome * >> * >> *no even length palindrome found for the given string. >> >> given string = ab*cddc*abr >> >> even lenght palindrome found = cddc >> >> if another even length palindrome found report the longest one. >> >> >> >> -- >> 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. >> > > -- > 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. > -- 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.
