SpanIdea interview question

String reverse function