Joe Bucky
Joe Bucky

Reputation: 21

How to create a program that identifies longest substring palindrome regardless of letter casing

I've attempted at googling algorithms for a program that outputs the result indicated in the question. Mostly, all what I've found was algorithms that satisfied the first constraint, but did not take into account the second part (ignoring the casing of letters). Conventional functions, such as strcmpi (I'm using c++) requires constant characters which make it impossible to incorporate within the algorithms alluded to above. In essence, I just need an idea on how I can go about creating such a program.

Upvotes: 0

Views: 70

Answers (1)

Honey Yadav
Honey Yadav

Reputation: 186

First create a program that identifies longest substring palindrome using your own compare function. And in that compare function if two characters are same then return true else if the difference between ASCII values of two characters is 32 then also return true. And rest as it is.

Upvotes: 1

Related Questions