Dsa
Recursion
Warm-up
String Palindrome Check
Write a program that checks if a given string is a palindrome. A palindrome is a word, phrase, or sequence that reads the same backward as forward. The program should ignore spaces and case. You need to implement a recursive function to achieve this.
Input format:
- A single string (1 <= length <= 1000).
Output format:
- Print 'True' if the string is a palindrome, otherwise print 'False'.
Example:
Input:
A man a plan a canal Panama
Output:
True
Key concepts
recursionstringsboolean
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