Recursion: Palindrome Word

Published by Deep Xavier in

Create a recursive function that determines whether a word is a palindrome or not.

Examples

is_palindrome("madam") ➞ true

is_palindrome("adieu") ➞ false

is_palindrome("rotor") ➞ true

Notes

  • All inputs are in lowercase.
  • You are expected to solve this challenge via recursion.
  • You can check on the Resources tab for more details about recursion.
Watch a quick demo on how Edabit works.