id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

recursiveIsPalindrome


Write a recursive method that returns whether a String is a palindrome. A palindrome is a String that is the same forward and backward. No loops or global variables allowed. Recursion only.

Precondition: str is non-null and consists only of lowercase letters, numbers, or spaces.
Postcondition: Ultimately returns true/false based on whether str is a palindrome.


recursiveIsPalindrome("") → true
recursiveIsPalindrome("a") → true
recursiveIsPalindrome("abc") → false

...Save, Compile, Run (ctrl-enter)

boolean recursiveIsPalindrome(String str) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy