Challenge 1: Length of a String

Given a string, find its length using recursion.

Problem Statement

Implement a function that takes a string testVariable and returns the length of the string.

Try to solve this problem using recursion.


A variable testVariable that contains a string.


The length of the input string.

Sample Input


Sample Output


Try it Yourself

Try this challenge yourself before examining the solution. Good luck!

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.