Re: [algogeeks] Re: palindrome problem

2010-11-18 Thread cheng lee
@ Arif Ali Saiyed No.s1 = ababa s2 = abba in s1 , the longest palidrome is aba , and the total number of substring which is palindromes is 3 in s2 , the longest palidrome is a, but if we use the longest palidrome as the substring palidrome , the number will be 3

Re: [algogeeks] Re: palindrome problem

2010-11-18 Thread Algoose chase
construct a 2-D array,Arr[strlen][strlen] according to the following rules. Arr[i][j] = 1 if i = j (they represent string of single char which is Arr[i], a palindrome by definition) Arr[i][j] = Invalid if i > j (only half the table across the leading diagonal would be filled including the diagona

[algogeeks] Re: palindrome problem

2010-11-17 Thread Arif Ali Saiyed
Hi Can you explain following with an example "esign an e cient al-gorithm to determine the minimum number of palindromes in adecomposition for a given string, " are you asking to find the longest palindrome ? -Arif On Nov 16, 11:51 pm, lichenga2404 wrote: > A palindrome is a string which is iden