13031 - The Length Of The Longest Palindromic   

Description

 

  • A palindrome is a word like “deed” or “level”, which remains the same when you spell it backward.

  • We assume that the input string terminates with a period '.' and the length of input string is less than 100.

  • Implementing the function int maxlength_palindrom(char input[], int length)​ that finds the length of the longest palindromic substring of the input string.

 

All you need to submit are:

 

int maxlength_palindrom(char input[], int length)

{

/* TODO: Your Code here */

} 

Reference code for this question is at the very bottom of this page under Partial Judge Code heading.

Input

String of characters that terminates with a period '.'

Output

The length of the longest palindromic substring of the input string.

Sample Input  Download

Sample Output  Download

Partial Judge Code

13031.c

Partial Judge Header

13031.h

Tags




Discuss