Given a string s, return a new string containing the characters of s in reverse order using recursion. The function should handle empty strings, single-character strings, and longer inputs correctly.
Constraints
0 <= len(s) <= 10^4
s consists of printable characters
The solution must use recursion
Function Signature
defreverse_string_recursive(s):
Interviewer
Your question is Reverse String Using Recursion. Start with the requirements in the Question tab.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.