+ 15

CHALLENGE: LONGEST PALINDROMIC SUBSTRING 💻⌨️🖱️

Write a code that finds the longest palindromic substring of a given string. If the result is more than one longest palindromic substring, show all (longest). Also show and if there is no palindromic substring. Note: palindromic substring must contain at least two letters. Example: Input: sololearn Output: olo, length:3 lol, length:3 Input: playground Output : can't find any palindromic substring All languages ​​are welcome! 👍

7th Nov 2017, 6:58 PM
LukArToDo
LukArToDo - avatar
15 ответов
8th Nov 2017, 8:09 AM
David Akhihiero
David Akhihiero - avatar
7th Nov 2017, 7:17 PM
LukArToDo
LukArToDo - avatar
+ 8
Do you mean that the substring should be symmetric with at least two letters? Did I understand it correctly?
7th Nov 2017, 8:51 PM
Vahid Shirbisheh
Vahid Shirbisheh - avatar
+ 8
@codasan.com Palindromic substring means that the substring is the same when read from left to right and from right to left. For example : b, aa, ana, ceec,... In this task, palindromic substring need contain at least two letters. That mean that "b" is not valid result. I hope that helps 😊
7th Nov 2017, 8:59 PM
LukArToDo
LukArToDo - avatar
+ 8
@codasan.com Ok buddy. Thanks 😊
7th Nov 2017, 9:03 PM
LukArToDo
LukArToDo - avatar
+ 7
7th Nov 2017, 11:39 PM
Vahid Shirbisheh
Vahid Shirbisheh - avatar
+ 5
Thanks @LukArToDo, I'll try it.
7th Nov 2017, 9:02 PM
Vahid Shirbisheh
Vahid Shirbisheh - avatar
12th Nov 2017, 1:05 PM
Goddess
Goddess - avatar
+ 3
heres it ## one liner// @@ vcc $ coded by Vcc .. tiny modifications by Sayan Chandra $ https://code.sololearn.com/c6Fvd52MmSyP/?ref=app
8th Nov 2017, 9:09 AM
sayan chandra
sayan chandra - avatar
7th Nov 2017, 10:11 PM
VcC
VcC - avatar
8th Nov 2017, 4:01 AM
sayan chandra
sayan chandra - avatar
13th Nov 2017, 9:12 AM
Lucas Pardo
Lucas Pardo - avatar
+ 1
@sayan any will to oneline this one ? https://code.sololearn.com/cs8YxxsT4rJF/?ref=app
8th Nov 2017, 8:29 AM
VcC
VcC - avatar
+ 1
You can never have enough codes that do the same thing, this is mine: https://code.sololearn.com/cHaQVs2leMU5/?ref=app
13th Nov 2017, 7:49 PM
Paul
Paul - avatar
0
Deals with multiple maxsize palindroms. https://code.sololearn.com/cs8YxxsT4rJF/?ref=app
8th Nov 2017, 8:03 AM
VcC
VcC - avatar