Recursion: Palindrome Phrase

Published by Deep Xavier in

A palindrome is a series of letters or numbers that reads equivocally backwards.

Write a recursive function that determines whether a given string is a palindrome or not.

Examples

isPalindrome("Maneuquenam") ➞ true

isPalindrome("This phrase, surely, is not a palindrome!") ➞ false

isPalindrome("Eva, can I see bees in a cave?") ➞ true

Notes

  • Symbols and special characters should be ignored.
  • You are expected to solve this challenge via recursion.
  • You can check on the Resources tab for more details about recursion in Java.
  • A collection of challenges in recursion can be found via this link.
Watch a quick demo on how Edabit works.