Sunday, February 7, 2016

Palindrome


Palindrome problem:

Given : string

Output: An integer

Give product of lengths of two non overlapping palindromes from the string.

For ex:

"abcadad"

String1: "aba"
String2: "dad"

Product : 9


1 comment: