Comviva interview question

Write a recursive function to calculate the length of a string