Find Palindrome Sub-string

Problem Overview

  • Find a sub-string that reads the same forwards and backwards (palindrome) in a given string.
  • Input: one uppercase A–Z string; Output: a palindromic sub-string of length > 1, or None.
  • Selection rules: choose maximum length; if tied, pick the lexicographically smallest.
  • Domain: string processing/puzzle inspired by Ray’s challenge.
  • Asked in Cisco interviews; a classic coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: