Practice · 2 of 5
Recursive palindrome
CHALLENGE
Difficulty: beginner+25 XP
Implement boolean isPal(String s, int lo, int hi) recursively: true when s[lo..hi] reads the same both ways. Base case lo >= hi is true; mismatched ends are false; otherwise recurse inward.
Press Submit to check your solution.
Back to lesson: Practice: Recursion reps