Skip to main content

Practice · 3 of 5

Recursive reverse

CHALLENGE
Difficulty: intermediate+25 XP

Reverse a string **recursively**: process(String s) returns s reversed, with base case length ≤ 1 and no loops allowed. Example: "abcd" → "dcba".

Back to lesson: Practice: Recursion gauntlet