Question bank › Sliding Window
Dsa Sliding Window Easy

Maximal Palindrome Length in Substrings

Write a function that returns the length of the longest palindromic substring found within a given string `s`. A palindromic string reads the same backward as forward. ### Input Format: - A single line containing the string `s` (1 <= |s| <= 1000). ### Output Format: - Output a single integer representing the length of the longest palindromic substring. ### Example: Input: aabbacca Output: 5 ### Explanation: The longest palindromic substring is 'acca' with length 4.

Key concepts

sliding_windowpalindrometwo_pointers

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.