Dsa
Recursion
Easy
Palindromic Substrings
Given a string, find all possible palindromic substrings of the string. A substring is palindromic if it reads the same forwards and backwards. Return each substring as a distinct entry in a list.
Input Format:
- A single string.
Output Format:
- Print each palindromic substring on a new line.
Example:
Input:
abba
Output:
ab
bb
abba
a
b
Key concepts
recursiondynamic programmingbacktracking
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