Here is code to find palindrome in linear time:
http://codepad.org/PMJzjpPJ
On Fri, Jun 18, 2010 at 5:28 AM, Chunyuan Ge wrote:
> good point, i am wrong, sorry
>
>
>
> On Fri, Jun 18, 2010 at 5:54 PM, Rohit Saraf
> wrote:
>
>> abcqwertycba
>>
>> So is abc a palindrome??
>> -
here's a linear time solution:
http://www.akalin.cx/2007/11/28/finding-the-longest-palindromic-substring-in-linear-time/
On Fri, Jun 18, 2010 at 4:58 PM, Chunyuan Ge wrote:
> good point, i am wrong, sorry
>
>
>
> On Fri, Jun 18, 2010 at 5:54 PM, Rohit Saraf
> wrote:
>
>> abcqwertycba
>>
>> So i
check this
http://www.akalin.cx/2007/11/28/finding-the-longest-palindromic-substring-in-linear-time/
On Fri, Jun 18, 2010 at 3:36 PM, Manzoor Ahmed wrote:
> What do you mean by origin string?
>
>
> On Fri, Jun 18, 2010 at 2:38 PM, Chunyuan Ge wrote:
>
>> Origin string a, reverse the string to g
good point, i am wrong, sorry
On Fri, Jun 18, 2010 at 5:54 PM, Rohit Saraf wrote:
> abcqwertycba
>
> So is abc a palindrome??
> --
> Rohit Saraf
> Second Year Undergraduate,
> Dept. of Computer Science and Engineering
> IIT Bombay
> http://www.cse
What do you mean by origin string?
On Fri, Jun 18, 2010 at 2:38 PM, Chunyuan Ge wrote:
> Origin string a, reverse the string to get b
> get the longest common string between a and b
>
> that's it.
>
> Chunyuan
>
>
> On Thu, Jun 17, 2010 at 8:38 PM, debajyotisarma > wrote:
>
>> Find the longest
abcqwertycba
So is abc a palindrome??
--
Rohit Saraf
Second Year Undergraduate,
Dept. of Computer Science and Engineering
IIT Bombay
http://www.cse.iitb.ac.in/~rohitfeb14
On Fri, Jun 18, 2010 at 3:08 PM, Chunyuan Ge wrote:
> Origin string a, reve
Origin string a, reverse the string to get b
get the longest common string between a and b
that's it.
Chunyuan
On Thu, Jun 17, 2010 at 8:38 PM, debajyotisarma
wrote:
> Find the longest palindrome in the given string.
> Minimum time-space complexity required
> (i have not solved it so don't kno
check two types of palindromes..
even and odd and as soon as u get one. just expand on both sides to get the
longest one..
even palindromes are
arr[i]==arr[i+1]
and odd palindromes are
arr[i]==arr[i=2]
On Fri, Jun 18, 2010 at 9:20 AM, Antony Vincent Pandian.S. <
sant...@gmail.com> wrote:
> I rem
I remember this question under discussion recently. Please check the
existing threads...
On 6/17/10, debajyotisarma wrote:
> Find the longest palindrome in the given string.
> Minimum time-space complexity required
> (i have not solved it so don't know what is min)
>
> --
> You received this mess
Find the longest palindrome in the given string.
Minimum time-space complexity required
(i have not solved it so don't know what is min)
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegrou
10 matches
Mail list logo