+ 7
[CHALLENGE] HOW GOOD ARE YOU AT HANDLING STRINGS?
Given a string.Find the length of the longest palindrome contained in the string. i.e. find the length of the longest palindromic substring from a given string. For example: string: helloworld o/p:3 explanation:owo is the palindromic substring. EFFICIENT CODE EXPECTED ALL LANGUAGES ARE WELCOMED
13 Respostas
+ 2
recently i found an O(n) algorithm called manacher's algorithm...check it out...its the most efficient algorithm..i couldn't understand it by the way...
+ 18
You'll love it, it works for numbers, letters, symbols. Accurate!!
https://code.sololearn.com/cSCQ0bvG4LsS/?ref=app
+ 14
Challenge Accepted!! đđ
+ 11
Here's a short Python code (case ignored and all characters accepted)
https://code.sololearn.com/coaFVdn2nbuI/?ref=app
+ 11
https://code.sololearn.com/cfbVeNQrv0cD/?ref=app
+ 8
https://code.sololearn.com/cDwOE90HR121/?ref=app
+ 7
Is "casac" considered a palindrome or it must be inside de string ("asa").
+ 6
@Abdul Sattar Mapara
Thank you. Then I'll start doing mine.
+ 3
I wonder if theres a more efficient solution.
https://code.sololearn.com/W3XNcAA3jrbk/?ref=app
+ 3
Everybody is following the same track.so now I am confused whom to give the tick...!
btw I was expecting an O(n^2) algorithm.Those of u don't know the Big-Oh notation surf the internet and find it out.Its pretty simple and useful for computer science students. Hope for more response!Thank You everyone.
+ 2
@Marfik Em casac is a palindrome and the o/p counts it as well
for a string that doesnot have palindrome the o/p should be 1 i.e 1 character is always a palindrome